Push notifications not working in android 12

1.3k Views Asked by At

I have a notification problem.

Since I upgraded the android api 30 to api 31, the firebase "push" notifications with ionic capacitor stopped working for android 12, they only work for android 11 api 30 or below

It works correctly with the target SDK 30, but you have to update this due to the new requirement of google play

2

There are 2 best solutions below

0
On

I have the same problem and the solution for me was to change firebaseMessagingVersion in android project from 21.0.1 (in my case) to 21.1.0 in build.gradle (capacitor-push-notifications)

firebaseMessagingVersion = project.hasProperty('firebaseMessagingVersion') ? rootProject.ext.firebaseMessagingVersion : '21.1.0'
1
On

This worked out for me, but then, when the notification is tapped the app won't open due to trampolin restrictions started on android 12