FirebasePushNotificationPlugin: Android 12 does not receive Push Notification
๐ Bug Report
On Android 12 my app is not receiving push notifications. Phones with Android 11 and below do receive the push notifications.
Added manually to manifest:
<service android:name="crc6494e14b9856016c30.PNFirebaseMessagingService" android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
I tried it also with android:exported=โtrueโ but same behaviour - no notifications on Android 12.
Hope that someone has a solution for this!
Used: Firebase.Plugin 3.4.1 TargetFramework Android 12 JDK 11
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 24
I managed to get it work for Android 12 and Android 13 by using a combination of suggestions mentioned here;
First, I updated all my existing packages.
Second, I installed the latest version of the following packages as described by @Rishi2611; Xamarin.Firebase.Common Xamarin.Firebase.Messaging Xamarin.GooglePlayServices.Base Xamrarin.Firebase.Iid
Third, I added the following to my AndroidManifest.xml file;
And finally the fourth, to get it to work for Android 13, I added the following permission to the AndroidManifest.xml (this permission is requred for Anrdoid 13 and wonโt work without it)
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
Then added the following code to MainActivity.cs to the end of OnCreate to request push notification permissions from the user on app start-up;
Make sure the target version is set to Android 13 (API Level 33).
Hopefully this helps someone out there whoโs still struggling with this!
i have added in my manifest file
this is my
but still not getting notification