Hello everybody.
For some reason the AlarmManager keeps running even when the phone is
asleep.
Here is the code that I use:
PendingIntent mAlarmSender = PendingIntent.getService(Main.this, 0,
new Intent(Main.this, mService.class), 0);
AlarmManager am = (AlarmManager)getSystemService(ALARM_SERVICE);
            am.setRepeating(AlarmManager.ELAPSED_REALTIME,
SystemClock.elapsedRealtime(), ALARM_SCHEDULE, mAlarmSender);
According to docs ELAPSED_REALTIME "...does not wake the device up; if
it goes off while the device is asleep, it will not be delivered until
the next time the device wakes up"

Described here: 
http://code.google.com/android/reference/android/app/AlarmManager.html

For some reason AlarmManager keeps running mService even when screen
of the phone is off.
The mService is a regular Service that supposed to connect to my web
server and periodically get some data, but I do not want the app to
connect to my server unless the phone is fully awake.

Am I missing something in the code or in the docs?


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