Wake up device in Doze mode

This commit is contained in:
2016-03-19 10:19:28 -04:00
parent 519737a1c3
commit 3f7d25461d

View File

@@ -79,7 +79,10 @@ public class ReminderHelper
alarmIntent, PendingIntent.FLAG_UPDATE_CURRENT);
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);
else
manager.set(AlarmManager.RTC_WAKEUP, reminderTime, pendingIntent);