How to save the contents of a plain text file on the phones storage to a variable in Android?
<p>I have some plain text data in the external storage of an android device and I want to save that plain text to a variable how could I do that?</p>

<p>I tried:</p>

<pre><code>Scanner in;
try {
in = new Scanner(openFileInput("aspw.dat"));
String password = in.nextLine();
} catch (FileNotFoundException e1) {
errortoast.show();
e1.printStackTrace();
}
</code></pre>

<p>And I get a file not found exception even though the file aspw.dat is right there in the root of the SD card.</p>
