Android.app.application Singleton Instance Gets Recreated
I am using android.app.Application to create a single instance. For some reason I see Android kills my Instance and recreate (call onCreate). How can I stop this from happening ? I
Solution 1:
For some reason I see Android kills my Instance and recreate (call onCreate)
That is fully expected behavior in Android OS. If you need smth to track some app's state, then you need to use some persistance means: file storage, shared preferences or ContentProvider. More details on this here: https://stackoverflow.com/a/4642069/247013
Post a Comment for "Android.app.application Singleton Instance Gets Recreated"