Can somebody explain the common way to handle C2DM intents work?
I have an app that does intelligent polling - it's essentially a messaging application - so it polls the server to check your inbox for new messages. There is an activity UI, and a background Service that polls conservatively.
Now to supplement the polling I have included C2DM - presumably to push inbox content that sits unread for 30 minutes.
So when I receive a C2DM RECEIVE intent, I am telling my background service to go poll.
How will this work?
I assume C2DM's main use case is an "idle" phone (i.e. in your pocket, screen off). So you get a RECEIVE intent, grab a wake lock, and fire off the background service to go poll; returning wake lock once you send an intent to the background service.
How long will the background service stay alive?
Won't android just kill it off right away?
Should I just try to do 1 server ping and then die?
I'm just confused about how much processing I can do after getting a C2DM intent.