Skip to content Skip to sidebar Skip to footer

Onreceive() Method Not Opening Application While Device Is In Sleep Mode..?

Hi friends i have a problem... Actually i use this code to open my application in certain time..the app is working fine but when the device is in sleep mode not working..?? public

Solution 1:

The wake lock of your broadcast receiver is only guaranteed to keep the phone awake for the duration of the onReceive method. If you need to do work beyond that method, you need to aquire/manage another wake lock.

A Commonsware library exists for this purpose. Have a look at: https://github.com/commonsguy/cwac-wakeful/blob/master/README.markdown

Post a Comment for "Onreceive() Method Not Opening Application While Device Is In Sleep Mode..?"