Unity-Technologies / com.unity.mobile.notifications

Mobile Notifications Package
https://docs.unity3d.com/Packages/com.unity.mobile.notifications@2.1/manual/index.html
Other
131 stars 42 forks source link

Android 12+ exact scheduling #220

Closed aurimasc closed 2 years ago

aurimasc commented 2 years ago

https://jira.unity3d.com/browse/MNB-10 Historically notifications were scheduled using exact scheduling on Android 6 and newer, older versions only supported inexact scheduling (notification would appear around the requested time, but could easily be a minute early or late). Sin Android 12 Google is pushing towards inexact with new permissions and control. Due to SDK being shipped we only supported inexact scheduling on Android 12. Changes in this PR:

Testing:

vaidasma commented 2 years ago

The settings can be a bit misleading for the users, including having the boolean list. Is there cases where these are not used together? Can it not be joined together?

image

Leaving PR on hold as Android 13 notifications are still not able to be delivered

Tested: • Schedulling after restart • Schedule at the exact time: everything / nothing

Pixel 6 is unable to receive notifications to the notification bar

Tested on devices so far: • VLNQA00267 - Samsung Galaxy S10+ (SM-G975F), CPU: Exynos 9 9820, GPU: Mali-G76, OS: 11 • VLNQA00460 - Google Pixel 6 (Pixel 6), CPU: Google Tensor (Whitechapel), GPU: Mali-G78, OS: 13 • VLNQA00230 - OnePlus 6T (ONEPLUS A6013), CPU: Snapdragon 845 SDM845, GPU: Adreno 630, OS: 9.0.0