Question: I'm currently using a Parser and it parses every time the onCreate gets called.
My parser uses an XML file that's located in my assetfolder.

Is there any chance that I can make it parse only once, instead of every time I rotate the screen or restart the application?

Thank you :)

Answer: 
You could add a preference. Something like -

```
void setIsAppOpened() {
    editor.putBoolean(APP_OPENED, true);
    editor.commit();
}

```

Set it in your onCreate(). Then, also add the following code to check if the preference exists.

```
if (!prefs.contains(APP_OPENED))
    {
        //parse the XML
        setIsAppOpened();
    }

```
You can parse your XML in a "Application" object and have it accessible from there. Check out the documentation at <http://developer.android.com/reference/android/app/Application.html>