Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

difference between RTC and RTC_WAKEUP in android

i am new to android i have to perform some operation after every 30 min whether my application is running or not so i want to how to perform these operation using service and alarm manager any example or running will be helpfull

like image 585
CodingRat Avatar asked May 10 '12 10:05

CodingRat


People also ask

What is RTC alarm in Android?

Real-time clock (RTC) alarms are clock-based alarms that use Coordinated Universal Time (UTC). Only choose an RTC alarm in these types of situations: You need your alarm to fire at a particular time of day. The alarm time is dependent on current locale.

What is RTC wakeup?

RTC_WAKEUP and ELAPSED_REALTIME_WAKEUP will wake up the device out of sleep mode. If your PendingIntent is a broadcast PendingIntent , Android will keep the device awake long enough for onReceive() to complete.

How do I set multiple alarms on Android?

To access the alarms, tap the alarm icon at the top of the screen. To add a new alarm, tap the plus icon button at the bottom of the screen. This button can be used to add multiple alarms. To set the time for the alarm, tap the hour on the time on the left and then tap the hour on the clock on the right.


1 Answers

Use RTC_WAKEUP if you want your service to perform some operation every 30 min as RTC_WAKEUP will wake the device up and deliver the pending intent. On the other hand RTC will deliver the intent only when the device wakes up.

like image 153
Tarun Avatar answered Oct 17 '22 06:10

Tarun