Push notifications not work in android 12

I know… and I’ll upgrade as soon as possible, but from Capacitor 2 to 4 it’s a big step that I better not to undertake, right now… :blush:

But it seems I have managed to have it work with Capacitor 2…
What I did was adding the following lines inside capacitor.build.gradle:

    implementation 'com.google.firebase:firebase-messaging:23.0.0'
    implementation 'com.google.firebase:firebase-iid:21.1.0'

Then, server side, the content of the Push must include the notification object, or it won’t be displayed by the system, something like:

{
    "notification":{
      "title":"This is the needed title for system display",
      "body":"This is the needed body for system display"
    },
    "data" : {
      "custom_app_field1" : "Whatever",
      "custom_app_field2" : "Whenever"
    }
}

And if “phonegap-plugin-push” or “cordova-plugin-push” were used, they must be removed for the project.
Also, if “jetifier” was used, it must be run again, to clear up of unused jetified classes.