My Xamarin Android app used to receive push notifications after a device re-boot. When I started targeting API 33, devices no longer receive notifications after a re-boot until the app is restarted. I saw a comment on another post about this from Wendy Zang of MSFT that says this is because Google has deprecated WakefulBroadcastReceiver for security. The Android documentation says:
In Android 8.0 (API 26 and above), Google placed limitations on what apps can do while users aren't directly interacting with them. These limitations affect background services and implicit broadcast receivers such as Android.Content.Intent.ActionBootCompleted. Because of these limitations, you might have difficulties registering a Boot Completed broadcast receiver on newer versions of Android. If this is the case, note that these restrictions do not apply to foreground services, which can be called from your broadcast receiver.
When targeting API 26 and above, what is necessary to get the app to receive push notifications after a device reboot, without having to launch the app? Can anyone please post an example?