title: How to save files in External Storage Public Directory DOCUMENTS on Android 4.1.2
body: <p>i want to save a file on my Android 4.1.2 smartphone in the documents directory.</p>
  
  <p>This code snippet: </p>
  
  <pre><code>File file = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS),"test.txt");
  </code></pre>
  
  <p>throws this exception:</p>
  
  <pre><code>E/AndroidRuntime﹕ FATAL EXCEPTION: main
  java.lang.NoSuchFieldError: android.os.Environment.DIRECTORY_DOCUMENTS
  </code></pre>
  
  <p>While this one is working:</p>
  
  <pre><code>File file = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS),"test.txt"); 
  </code></pre>
  
  <p>But i want to save my file in my documents directory, not in downloads. Ive read DIRECTORY_DOCUMENTS is only available in Android 4.4 and higher. But there is also a documents direcotry on my smartphone. So, is there no solution to save it in documents?</p>
  
  <p>Thx for answers</p>
  
  <p>Pebbles</p>