How to save a state of a variable in android app and use it
<p>I have an android app which was built on eclipse. What i am currently doing is going through set of question in xml file randomly to ask. Xml file looks like this:</p>

<pre><code>&lt;item&gt;
    &lt;ques&gt;&lt;/ques&gt;
    &lt;option1&gt;&lt;/option1&gt;
    &lt;option2&gt;&lt;/option2&gt;
    &lt;option3&gt;&lt;/option3&gt;
    &lt;ans&gt;&lt;/ans&gt;
    &lt;level&gt;1&lt;/level&gt;
&lt;/item&gt;
&lt;item&gt;
    &lt;ques&gt;&lt;/ques&gt;
    &lt;option1&gt;&lt;/option1&gt;
    &lt;option2&gt;&lt;/option2&gt;
    &lt;option3&gt;&lt;/option3&gt;
    &lt;ans&gt;&lt;/ans&gt;
    &lt;level&gt;1&lt;/level&gt;
&lt;/item&gt;
&lt;item&gt;
    &lt;ques&gt;&lt;/ques&gt;
    &lt;option1&gt;&lt;/option1&gt;
    &lt;option2&gt;&lt;/option2&gt;
    &lt;option3&gt;&lt;/option3&gt;
    &lt;ans&gt;&lt;/ans&gt;
    &lt;level&gt;2&lt;/level&gt;
&lt;/item&gt;
</code></pre>

<p>so on.... </p>

<p>Right now i am selecting question from level one randomly. Like there are 50 question in level 1 and 50 in level 2. I want to select question in order now. Like start from the top to bottom. Like if user A logs in plays the game he is being asked question a and b from level 1. Then he closes the game and logs back again so he should see c and d now.</p>

<p>My problem is how can this state be saved in android? Is there a easy way to do this?</p>
