Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] Allow to set the notification to executes on idle #959

Merged
merged 1 commit into from
Apr 15, 2020

Conversation

hshiraiwa
Copy link

@hshiraiwa hshiraiwa commented Dec 7, 2018

On Android 6.0 (API level 23) and above in order to reduce battery consumption, the system enters in Doze mode while the device is unused for long periods of time.
While on Doze mode the AlarmManager alarms dont execute exactly on the scheduled time, they are deferred to the next maintenance window. This cause the notifications to show after their scheduled time.
This change adds a new attribute allowWhileIdle to allow the notification to be displayed while on doze

This behavior is documented on: https://developer.android.com/training/monitoring-device-state/doze-standby

On Android 6.0 (API level 23) and above in order to reduce battery
consumption, the system enters in Doze mode whilethe device is unused
for long periods of time.
While on Doze mode the AlarmManager alarms dont execute exactly on the
scheduled time, they are deferred to the next maintenance window. This
cause the notifications to show after their scheduled time.
This change adds a new attribute `allowWhileIdle` to allow the
notification to be displayed while on doze
@cabelitos
Copy link

👍

Copy link

@mmccartney mmccartney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

mmccartney pushed a commit to mmccartney/react-native-push-notification that referenced this pull request Feb 15, 2019
@Dallas62 Dallas62 self-assigned this Apr 10, 2020
@Dallas62 Dallas62 merged commit 9e563df into zo0r:master Apr 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants