title: How to write to an external text file in Android?
body: <p>I want to write a string line in a text file in android project (using Eclipse). This is the code which i am trying but its not working...</p>
  
  <pre><code>    String s="hello azeem\n";
      try{
      FileOutputStream fos = openFileOutput("C:\\eventslog.txt", Context.MODE_PRIVATE);
      fos.write(s.getBytes());
      fos.close();
      }
      catch (Exception e){
  
      }
  </code></pre>
  
  <p>Any ideas??</p>