1

I have created an app. Works great, but I want some same functionality as gmail uses: When I receive a new email, I get a notification. I inspected my phone and saw no services or applications running that look like the gmail-app.

I have investigated the AlarmManager and services, but as soon as I stop the app both don't work anymore.

Could someone give me a hint how to accomplish this?

Thanks in advance

1 Answers1

1

I inspected my phone and saw no services or applications running that look like the gmail-app.

Partly, that is because Gmail gets such notifications via broadcast Intents from the OS, via the subsystem we see as C2DM (which is why you do not see a process). Partly, that is because Gmail is part of the firmware and may get some extra benefits as a result, in terms of resisting the normal behaviors that befall an app that is force-stopped.

Could someone give me a hint how to accomplish this?

You can't. Particularly on Android 3.1+, if your app is force-stopped, it will not run again until the user manually runs one of your activities (e.g., from the launcher).

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • Okay, so there is no way I can put notifications on Android WITHOUT running the actual app... :( Thanks for the info –  May 10 '12 at 15:36