No, when Android terminates your process, your static data members go away. A new process will be forked to run your app on the next message (or when the user launches your activity, or whatever), at which point your static data members will have their default values.
On Mon, Aug 6, 2012 at 7:03 AM, Mario Bat <[email protected]> wrote: > Hi everyone, I am writing on an Android application where i am registering > to GCM. When I click the cehckbox to register i want to set a static > variable isRegistered to true/false. Now when i receive the message I want > to check this variable and if it is true I make an notification. > So when i get out of my app I still receive the notification and everything > is good. But what happens when Android deletes my application from memory to > free memoy? Does my static variable still exist? > > -- > 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 -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 4.0 Available! -- 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

