On Mar 4, 10:40 am, Hari Edo <[email protected]> wrote: > Yes, indeed. Extend android.app.Application. > ... Android constructs your class instead of > the default. It gets its own onCreate()/onDestroy() lifecycle that > spans all activities.
Clarification: Application has no onDestroy() and you can't rely on the onTerminate() either. Android can kill a process without notifying the Application class instance, so if anyone adds other features besides the singleton pattern, take care in holding onto any kind of resource that needs to be committed/saved/closed/freed for a clean termination. In fact, better if you don't hold any such resource open/uncommitted at all, if you can help it. -- 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

