Alarms
- Remain active even if the device is asleep
- Are canceled on device shutdown/restart
AlarmManager
- To get a reference use
- getSystemService(Context.ALARM_SERVICE)
Methods
- Create Alarm
- set(...)
- Repeat
- setRepeating()
- setInexactRepeating()
Alarm Type Constants
- RTC_WAKEUP - Execute the task at specific wall clock time. Wake up the device
- Use System.currentTimeMillis() to calculate the time
- RTC - Execute the task at specific wall clock time. Not wake up the device
- ELAPSE_REALTIME - (time since boot, including sleep)
- Use SystemClock.elapsedRealtime() to calculate the time
- ELAPSE_REALTIME_WAKEUP -
Comentarios
Publicar un comentario