0

When an Android device receives mail, does it do this by periodically connecting to the mail server? When the device is in standby mode where the screen is off, I assume that the standard mail app also is shut down but possibly uses the AlarmManager to awake and then check the mail. I can't imagine that the mail app is always running with a full Wakelock turned on, keeping the CPU always running, as that would drain the battery.

The reason I need to know this is because my own app needs to get a notification from its own server when certain events take place. I could just as well implement a repeating alarm that activates my app periodically and checks for the notifications. But if the mail client already is waking up at a regular time interval, I probably can save on battery consumption by using e-mail to notify my app instead. For this to work though, it must be possible for the mail app to launch my app when it receives e-mail. I doubt that this is possible, or is it?

Johann
  • 27,536
  • 39
  • 165
  • 279
  • I believe that Gmail for Android uses push emails, and does not poll the server. You might be better off going for Google Cloud Messaging. – Philip Sheard May 30 '13 at 08:06

1 Answers1

0

This is what you wnat to use: Google Cloud Messaging

pumpkee
  • 3,357
  • 3
  • 27
  • 34