Ok...the problem is that if I unregister from GCM the app will still 
receive notifications until GCM sets it to unregistered that can wait for 
2-3 days. Thats what i heard at least...
The only way I see here is to write it to a file if its registered or not, 
and when the push comes check in the file if it is registered. You have any 
other suggestions?


Dana ponedjeljak, 6. kolovoza 2012. 13:05:54 UTC+2, korisnik Mark Murphy (a 
Commons Guy) napisao je:
>
> 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 <batfudba...@gmail.com> 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 android-developers@googlegroups.com 
> > To unsubscribe from this group, send email to 
> > android-developers+unsubscr...@googlegroups.com 
> > 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to