title: Android: writing simple file to external storage on Emulator
body: <p>I am learning Android. I have the latest, as of today, Android Studio and SDK.</p>
  
  <p>I have gone through the tutorial on "Saving Data" at developer.android.com. I have perused StackOverflow for a couple hours and can't seem to find precisely what I am looking for; so here goes.</p>
  
  <p>My app will have a need to read and write from a directory on the Android device. This directory needs to be accessible when connected to my PC via Windows Explorer. I must admit I am confused by getExternalFilesDir(), getExternalStoragePublicDirectory() and all the other getFilesDir() methods.</p>
  
  <p>Question 1: How do I create, access, read/write a simple text file to such a directory. It would be fine if this directory goes away if the user uninstalls the App. But the directory must be accessible to my App on the phone, and to Windows Explorer when connected to my PC via USB cable. Those are the only requirements.</p>
  
  <p>Question 2: In trying to figure this out, I am using an AVD virtual device. When querying getExternalStorageState(), it says "Removed". Can I access such a directory when debugging using the AVD virtual device; and if so, what am I missing? I have the "WRITE_EXTERNAL_STORAGE" permission in my manifest file. I have also set my AVD with the "SD Card" set to "Studio-managed" and "200 MB".</p>
  
  <p>Thanks.</p>