On Mon, Dec 13, 2010 at 1:56 PM, Tobiah <[email protected]> wrote: > What would that <application> tag attribute look like? >
http://developer.android.com/guide/topics/manifest/application-element.html#nm <http://developer.android.com/guide/topics/manifest/application-element.html#nm> > Also, in the docs for android.app.Application, this is said: > > There is normally no need to subclass Application. In most situation, > static singletons can provide the same functionality in a more modular way. > If your singleton needs a global context (for example to register broadcast > receivers), the function to retrieve it can be given a Context which > internally uses Context.getApplicationContext() when first constructing the > singleton. > > I don't really understand this, although I know what a singleton is. > You may want to explain what you don't understand. > Also, if android reclaims my apps memory after a long period of > disuse, does the app actually have to start up again from scratch when it > comes back? > If the process you're running in gets killed, yes, it will have to be recreated, including your Application subclass, the last viewed or now-current Activity, and any static variables. > Can there be no static state through that process? > If by "static state" you mean data stored in variables declared with the static keyword, then no, they will be wiped. ------------------------------------------------------------------------------------------------- TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

