title: Android saving file to SD Card, not internal storage
body: <p>I know there have been questions about this, but for some reason nothing seems to work for me.
  I'm trying to get 2 text files to save to the SD card from my app.  It correctly creates the directory and the files, but always to the Internal Storage, never the External Storage.  I do have the permissions in place as well in the Manifest.</p>
  
  <pre><code>try {
          File sdCard = Environment.getExternalStorageDirectory();
          File myFile = new File(sdCard.getAbsolutePath() + "/rlgl");
          myFile.mkdir();
         // myFile.createNewFile();
          String newLine = System.getProperty("line.separator");
          File file = new File(myFile, "rlgls.txt");
          if(file.exists())  {
  
          } else if (!file.exists()){
          FileOutputStream fOut = new FileOutputStream(file);
          OutputStreamWriter myOutWriter = 
                                  new OutputStreamWriter(fOut);
          for (int i = 0; i &lt; 30; i++) {
          myOutWriter.append("0.0" + newLine);
          }
          myOutWriter.close();
          fOut.close();
          }
          } catch (IOException e) {
              e.printStackTrace();
          }
  </code></pre>
  
  <p>This is the code that I am using.  I've followed directions from other Stackoverflow responses but it never goes to the SD Card.  Is there something I'm doing wrong?  Also a follow up question is there a way for me to use the above code in order to make the files invisible to the user.  They should have no reason to open them.  Thanks in advance.</p>