Andrew
Andrew

Reputation: 2896

Android 12 firebase push notifications don't work when app is in the background

I'm sending test push notifications form firebase>compose notification page. I receive push notifications on Android 8, 9, 10, 11, but not 12.

And I have two devices on Android 12: physical phone Samsung S22 and Pixel emulator. In both cases Push Notifications don't appear in the Notification tray.

Note:

My service in the android manifest:

        <service
            android:name=".old.push.FCMHandlerService"
            android:enabled="true"
            android:exported="true">
            <intent-filter>
                <action android:name="com.google.firebase.MESSAGING_EVENT" />
            </intent-filter>
        </service>

Upvotes: 7

Views: 9891

Answers (1)

alelaru
alelaru

Reputation: 56

In my case i was using an old version of react native firebase and i made the changes for the pending Intent. However the error appear by using an old dependency in my build.gradle inside the app folder which hadn't solved the pending intent change. I just upgraded the versions of "com.google.firebase:firebase-messaging:xxx for the following

implementation "com.google.firebase:firebase-iid:21.1.0"
implementation "com.google.firebase:firebase-messaging:22.0.0"

For more infor check this issue: https://github.com/EddyVerbruggen/nativescript-plugin-firebase/issues/1876

Upvotes: 4

Related Questions