Skip to content

Commit

Permalink
Force awake notification, if possible.
Browse files Browse the repository at this point in the history
  • Loading branch information
jq-rs committed Aug 7, 2019
1 parent b8f358e commit 138fa6a
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/android/notification/Notification.java
Original file line number Diff line number Diff line change
Expand Up @@ -221,21 +221,21 @@ void schedule(Request request, Class<?> receiver) {
context, 0, intent, FLAG_CANCEL_CURRENT);

try {
switch (options.getPrio()) {
case PRIORITY_MIN:
mgr.setExact(RTC, time, pi);
break;
case PRIORITY_MAX:
//switch (options.getPrio()) {
// case PRIORITY_MIN:
// mgr.setExact(RTC, time, pi);
// break;
// case PRIORITY_MAX:
if (SDK_INT >= M) {
mgr.setExactAndAllowWhileIdle(RTC_WAKEUP, time, pi);
} else {
mgr.setExact(RTC, time, pi);
}
break;
default:
mgr.setExact(RTC_WAKEUP, time, pi);
break;
}
// break;
// default:
// mgr.setExact(RTC_WAKEUP, time, pi);
// break;
//}
} catch (Exception ignore) {
// Samsung devices have a known bug where a 500 alarms limit
// can crash the app
Expand Down

0 comments on commit 138fa6a

Please sign in to comment.