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

Sendo push to device android 13 #468

Open
ivanteles opened this issue Jul 27, 2023 · 4 comments
Open

Sendo push to device android 13 #468

ivanteles opened this issue Jul 27, 2023 · 4 comments

Comments

@ivanteles
Copy link

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?

@StefanOber
Copy link

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.

@AlleSchonWeg
Copy link
Contributor

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.

@StefanOber
Copy link

@AlleSchonWeg Give me your address and I will send you some chocolate. POST_NOTIFICATIONS permission was the problem.
Thanks!!!

@Ghevi
Copy link

Ghevi commented Oct 30, 2023

@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.

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

No branches or pull requests

4 participants