The way to do this is to create your own subclass of android.app.Application
, and then specify that class in the application tag in your manifest.
public class MyApp extends Application {
String foo;
}
In the AndroidManifest.xml add android:name
<application android:name=".MyApp"
android:icon="@drawable/icon"
android:label="@string/app_name">