Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can do this with the Android <a href="http://developer.android.com/reference/android/content/SharedPreferences.html" rel="nofollow">SharedPreferences</a> Class which is a which way to save setting between launches.</p> <pre><code>SharedPreferences appSettings = this.getSharedPreferences("fileName", 0); SharedPreferences.Editor = appSettings.edit; appSettings_Edit.putString("saveme", "this will be saved"); //First Parameter, name of the value, second parameter, value of the name appSettings_Edit.commit(); //This is called to commit the changes to memory. //This can be called anytime after `commit()`, including in any sequential launches, and it will return the vale of whatever you set. appSettings.getString("saveme"); </code></pre> <p>If you want to save an actual <code>file</code> you can use a BufferedWriter to create some hard file on the system:</p> <pre><code>BufferedWriter out = new BufferedWriter(new FileWriter(new File(fileName))); out.write("I am a line of text written in" + fileName); out.close(); </code></pre> <p>You can then retrieve the contents of the file by using a BufferedReader:</p> <pre><code>List&lt;String&gt; SomeStringListArray = new ArrayList&lt;String&gt;(); BufferedReader in = new BufferedReader(new FileReader(new File(fileName))); String s; while ((s = in.readLine()) != null) { SomeStringListArray.add(s); } in.close(); </code></pre> <p>You can also create this file in the Android Cache Directory so it will be accessable only by your file by having the path of the file name derived from:</p> <pre><code>this.getChachDir(); this.getExternalCacheDir(); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload