I want an activity to be displayed at a certain time. For this, I am using AlarmManager. It works fine when the device is awake, but it doesn\'t wake it up if it\'s asleep.<
For Services (maybe works for activity as well), extend your AlarmReceiver from WakefulBroadcastReceiver
, it acquires WAKE_LOCK for you while intent is being processed.
WakefulBroadcastReceiver
docs -
https://developer.android.com/reference/android/support/v4/content/WakefulBroadcastReceiver.html
Keeping device awake guide - https://developer.android.com/training/scheduling/wakelock.html