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
            Asked
            
        
        
            Active
            
        
            Viewed 1.1k times
        
    11
            
            
        - 
                    here is complete answer : [http://stackoverflow.com/questions/5938213/android-alarmmanager-rtc-wakeup-vs-elapsed-realtime-wakeup][1] [1]: http://stackoverflow.com/questions/5938213/android-alarmmanager-rtc-wakeup-vs-elapsed-realtime-wakeup – amir Feb 01 '15 at 12:24
2 Answers
21
            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.
 
    
    
        Tarun
        
- 13,727
- 8
- 42
- 57
- 
                    4
- 
                    1refer to sagar, what do you mean by weak_up ? when the screen turns on? – Shivam Sharma Mar 17 '17 at 05:56
- 
                    @SagarNayak According this, https://google-developer-training.github.io/android-developer-fundamentals-course-concepts-v2/unit-3-working-in-the-background/lesson-8-alarms-and-schedulers/8-2-c-alarms/8-2-c-alarms.html, wake up mean wake up cpu. – twlkyao Nov 05 '21 at 03:12
- 
                    @ShivamSharma According this, https://google-developer-training.github.io/android-developer-fundamentals-course-concepts-v2/unit-3-working-in-the-background/lesson-8-alarms-and-schedulers/8-2-c-alarms/8-2-c-alarms.html, wake up mean wake up cpu. – twlkyao Nov 05 '21 at 03:12
0
            
            
        I think everything you need to know is in the docs on AlarmManager
There can be many pitfalls trying to keep the phone awake, also see cwac-wakeful by Mark Murphy on github
 
    
    
        Neil
        
- 7,861
- 4
- 53
- 74
