Sendo push to device android 13
I followed the implementation guide. However, in android 13 it does not request permission to send a push and even manually informing that I can receive notification, the notification does not arrive in versions 13. In other versions it is working fine. Any tips on how to resolve?
I got the same problem. Notifications arrive when the app is open but not when it is closed. Happens at least on Android 13. On an older Device it works.
If your targetsdk is >=33 then you need POST_NOTIFICATIONS permission (google about implementation). Sometimes Firebase take some time to register your Token. Call FirebasePushNotificationManager.Initialize without resetting the token. Try restart your device and/or publish your app in release mode.
Implement a custom PushNotificationHandler (derive from DefaultPushNotificationHandler) and override OnReceived. If OnReceived is called, then inspect DefaultPushNotificationHandler OnReceived and find out why the method returns without showing your message.
Good luck.
@AlleSchonWeg Give me your address and I will send you some chocolate. POST_NOTIFICATIONS permission was the problem. Thanks!!!
@AlleSchonWeg sorry to bother you, if i set the target framework to Android 33 the namespace Plugin.FirebasePushNotification is not available anymore. Is there a way to make it work?
Edit: never mind setting it from the project properties interface messed up the csproj file, i manually added
<TargetPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">
33
</TargetPlatformVersion>
and it works.