I am working on an application which spawns some services in the background 
using AlarmManager. Timing is very crucial to our application and the 
functionality can't wait for the next maintenance window to occur. Asking a 
user to white-list the application is not an issue but doesn't fix the 
issue of suspending alarms. Also battery consumption is not that big of an 
issue as well.


First possible solution that came to my mind was to spawn an always running 
foreground service to handle the rescheduling of services instead of 
AlarmManager but in doing so will shift most of the base structure of our 
application and is not feasible for us.

Current fix that I just implemented is to send a high priority push 
notification and on receiving the message, take full wake lock and turn on 
the screen to break doze mode.


I wanted to know if there is an alternate way of doing this? Also is it 
possible without taking a wake lock? Can there be any issues in 
implementing this solution?


P.S. I am using UrbanAirship for push notifications.

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/fd21d0d6-cdb1-4292-9edf-168d0fe59b57%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to