Save Internal File for Login
<p>Hy!!</p>

<p>I have a login form in my app, but i want to save/restore the textfile internal in the app not on the internal phone memory.</p>

<p>Are there some code snippets?</p>

<p>I made a internal file saving/restoring but it don't work.</p>

<pre><code>if (cb.isChecked())
                {
                    File file = new File("/mmt/sdcard/login.skip");
                    Writer output = null;
                    try
                    {
                         output = new BufferedWriter(new FileWriter(file));
                            output.write(etuser.getText().toString()+ ";" + etpw.getText().toString());
                            output.close();
                    }
                    catch (Exception e) {
                        // TODO: handle exception
                    }

                }
</code></pre>

<hr>

<pre><code>File file = new File("/mmt/sdcard/login.skip");
    if(file.exists())
    {   try
        {
          BufferedReader input =  new BufferedReader(new FileReader(file));
          while (( line = input.readLine()) != null){
             line2 = line;
            }
          etuser.setText(line2.split(";")[0]);
          etpw.setText(line2.split(";")[1]);
          input.close();
        }
        catch (Exception e) {
            // TODO: handle exception
        }
    }
</code></pre>
