mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-07 01:28:52 -06:00
Wake up device in Doze mode
This commit is contained in:
@@ -79,7 +79,10 @@ public class ReminderHelper
|
|||||||
alarmIntent, PendingIntent.FLAG_UPDATE_CURRENT);
|
alarmIntent, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||||
|
|
||||||
AlarmManager manager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
|
AlarmManager manager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
|
||||||
if (Build.VERSION.SDK_INT >= 19)
|
|
||||||
|
if (Build.VERSION.SDK_INT >= 23)
|
||||||
|
manager.setExactAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, reminderTime, pendingIntent);
|
||||||
|
else if (Build.VERSION.SDK_INT >= 19)
|
||||||
manager.setExact(AlarmManager.RTC_WAKEUP, reminderTime, pendingIntent);
|
manager.setExact(AlarmManager.RTC_WAKEUP, reminderTime, pendingIntent);
|
||||||
else
|
else
|
||||||
manager.set(AlarmManager.RTC_WAKEUP, reminderTime, pendingIntent);
|
manager.set(AlarmManager.RTC_WAKEUP, reminderTime, pendingIntent);
|
||||||
|
|||||||
Reference in New Issue
Block a user