https://jira.unity3d.com/browse/MNB-80
Android manifest for notifications always has a disabled receiver for rescheduling notifications after reboot. This receiver then is enabled by Java code depending on setting, value of which is also in the manifest as meta-data.
While receiver can be created by code, they are then bound to context lifecycle, as such it is better to have this receiver in the manifest.
This PR removes the Java code to enable the receiver and moves the logic to post processing: we will only add receiver to manifest if user has enabled reschedule on boot setting.
Developer testing:
tested that manifest items are added as requested in Unity 2022.3 and 6 (different code path before 6)
tested that after reboot notification still arives (Pixel 5, Android 13)
Additional testing required:
whether notifications work after reboot on more devices and Android versions; when in doubt - check without these changes
https://jira.unity3d.com/browse/MNB-80 Android manifest for notifications always has a disabled receiver for rescheduling notifications after reboot. This receiver then is enabled by Java code depending on setting, value of which is also in the manifest as meta-data. While receiver can be created by code, they are then bound to context lifecycle, as such it is better to have this receiver in the manifest. This PR removes the Java code to enable the receiver and moves the logic to post processing: we will only add receiver to manifest if user has enabled reschedule on boot setting.
Developer testing:
Additional testing required: