title: I can't find the location of a file that my app creates in Android
body: <p>Hello my code has two buttons Save and Read when I press save it saves data to a SampleFile.xml  and when I press load the content of the xml file shows up in the screen of the device. My app working but when i am trying to locate the SampleFile.xml there is nowhere. I tried my app to emulator and to a physical device</p>
  
  <pre><code>public class MainActivity extends Activity {
      EditText inputText;
      TextView response;
      Button saveButton,readButton;
  
      private String filename = "SampleFile.xml";
      private String filepath = "MyFileStorage";
      File myExternalFile;
      String myData = "&lt;question&gt; "+ Test.s +" &lt;qusetion&gt;\n";
  
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
         inputText = (EditText) findViewById(R.id.myInputText);
          response = (TextView) findViewById(R.id.response);
  
  
  
          saveButton =
                  (Button) findViewById(R.id.saveExternalStorage);
          saveButton.setOnClickListener(new OnClickListener() {
              @Override
              public void onClick(View v) {
                  try {
                      FileOutputStream fos = new   FileOutputStream(myExternalFile);
                      fos.write(myData.toString().getBytes());
                      fos.close();
                  } catch (IOException e) {
                      e.printStackTrace();
                  }
                  inputText.setText("");
                  response.setText("SampleFile.xml saved to External   Storage..");
              }
          });
  
         readButton = (Button) findViewById(R.id.getExternalStorage);
          readButton.setOnClickListener(new OnClickListener() {
              @Override
              public void onClick(View v) {
                  try {
                      FileInputStream fis = new  FileInputStream(myExternalFile);
                      DataInputStream in = new DataInputStream(fis);
                      BufferedReader br =
                              new BufferedReader(new  InputStreamReader(in));
                      String strLine;
                      while ((strLine = br.readLine()) != null) {
                          myData = myData + strLine;
                      }
                      in.close();
                  } catch (IOException e) {
                      e.printStackTrace();
                  }
                  inputText.setText(myData);
                  response.setText("SampleFile.xml data retrieved from External Storage...");
              }
          });
  
         if (!isExternalStorageAvailable() || isExternalStorageReadOnly()) {
              saveButton.setEnabled(false);
          }
          else {
              myExternalFile = new File(getExternalFilesDir(filepath), filename);
          }
  
  
       }
          private static boolean isExternalStorageReadOnly() {
          String extStorageState = Environment.getExternalStorageState();
          if (Environment.MEDIA_MOUNTED_READ_ONLY.equals(extStorageState))     {
              return true;
          }
          return false;
      }
  
        private static boolean isExternalStorageAvailable() {
          String extStorageState = Environment.getExternalStorageState();
          if (Environment.MEDIA_MOUNTED.equals(extStorageState)) {
              return true;
          }
          return false;
      }
  }
  </code></pre>