skip to Main Content

Android Studio: Firebase Push Notifications not working when app is minimized or closed

After updating compileSdkVersion from 30->31 in gradle file, android phones have stopped receiving notifications when the app is minimized or closed. Gradle File: implementation 'com.google.firebase:firebase-analytics:17.2.2' implementation 'com.google.firebase:firebase-auth:19.2.0' implementation 'com.google.firebase:firebase-firestore:21.4.0' implementation 'com.google.firebase:firebase-messaging:20.1.0' implementation 'com.google.firebase:firebase-analytics:17.2.2' implementation 'com.google.android.gms:play-services-location:18.0.0' Manifest File: <service android:name=".service.ABCMessaging" android:exported="true">…

VIEW QUESTION

JS/Firebase – messaging.onBackgroundMessage is not a function

Here is my whole code: import { initializeApp } from "https://www.gstatic.com/firebasejs/9.16.0/firebase-app.js"; import { getMessaging, getToken } from "https://www.gstatic.com/firebasejs/9.16.0/firebase-messaging.js"; //This data is filled correctly just clearing it here for the question const firebaseConfig = { apiKey: "", authDomain: "", projectId: "t",…

VIEW QUESTION

Reference error: self is not defined when implementing firebase messaging

In my Nextjs project I'm trying to implement push notification with firebase messaging (my firebase version is 8.10.0), after creating the firebase-messaging-sw.js file in my public folder: importScripts( "https://www.gstatic.com/firebasejs/8.10.0/firebase-app.js" ); importScripts( "https://www.gstatic.com/firebasejs/8.10.0/firebase-messaging.js" ); const firebaseConfig = { apiKey: "***", authDomain:…

VIEW QUESTION
Back To Top
Search