Run code ONCE on startup
<p>I want to run a small piece of code each time the app starts up. I have tried the following:</p>

<ul>
<li>In the Activity.onCreate(). But this won't work as the activity could get re-created on rotation for example.</li>
<li>Create a subclass of Application and run in onCreate() there. This doesn't seem to work either. It gets executed when the app is installed, but not when you back-out of the application and go into it again.</li>
</ul>

<p>Any ideas?</p>
