title: Problem Writing Files problem in Android Emulator
body: <p>I am trying to write some simple data to External storage using the following code. I am missing something here but not sure what. Thanks</p>
  
  <p>RobD</p>
  
  <pre><code>public class TimeCard extends Activity {
      /** Called when the activity is first created. */
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
  
          final Button button = (Button) findViewById(R.id.Button01);
          final EditText edittext = (EditText) findViewById(R.id.EditText01);
          final EditText edittext1 = (EditText)findViewById(R.id.EditText02);
          final EditText edittext2 = (EditText)findViewById(R.id.EditText03);
          final EditText edittext3 = (EditText)findViewById(R.id.EditText04);
          final String inputString = edittext + "/n" + edittext1 + "/n"+  edittext2 + "/n" + edittext3;
          button.setOnClickListener(new OnClickListener() {
              public void onClick(View v) {               
                //Do it
                CreateFile(inputString);
                //Let them know it
                Toast.makeText(TimeCard.this, "You are Clocked In", Toast.LENGTH_LONG).show();
              }
  
  
          });
      }
      //Write to SD Card
   public void CreateFile(String InputString){        
  
       File SDCard = Environment.getExternalStorageDirectory();  
       String FILENAME = SDCard + "/time_card.txt";
  
          FileOutputStream fos = null;
          try {
              fos = openFileOutput(FILENAME, Context.MODE_WORLD_READABLE);
          } catch (FileNotFoundException e) {
  
              e.printStackTrace();
          }
          try {
              fos.write(InputString.getBytes());
          } catch (IOException e) {
  
              e.printStackTrace();
          }
          try {
              fos.close();
          } catch (IOException e) {
  
              e.printStackTrace();
          }
          }
     }
  </code></pre>