Hi,

I have a main application, that at some point spawns a service that
checks for updates, if it finds any, it posts a notification with the
link to the update, and then the update service stops.
Through the debugger I've noticed that the notification pops up but
then disappears once my service is stopped, which I guess makes sense
since the Notification object was instantiated within that service.

What would be the  best practice of keeping that notice available
until the user clicks it?

I can see two paths:
1) somehow attaching the notification to my top service - which might
get really ugly  --> since that update service is spawned by another
sub-service that is spawned by a broadcast receiver... so even if i
wanted to somehow  pass the object of my top level service it would
mess the entire abstraction of my app structure and would force me to
keep pointers to it through every event and service that I use...
Perhaps there is some other way to get that service through the app's
context? or any other alternative?

2) Finding a way to keep my update-service alive until the user
presses the notification, but I'm not sure if there is any intent
broadcasted that I could listen to...

Any suggestions would be appreciated,
Thanks!

-- 
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