firebase-cloud-messaging

I'm unable to get Device token in an ionic app as a result of Cannot read property 'onTokenRefresh' of undefined

徘徊边缘 提交于 2021-01-07 02:45:25
问题 I followed two tutorials that suggested installed the following: ionic cordova plugin add cordova-plugin-fcm-with-dependecy-updated npm install @ionic-native/fcm I kept getting errors after installing to a device that said the fcm plugin isn't installed so I viewed https://www.npmjs.com/package/cordova-plugin-fcm-with-dependecy-updated#fcmontokenrefresh site that suggested uninstalling npm uninstall @ionic-native/fcm # Ionic support is included and conflicts with @ionic-native's

In flutter how to clear notification in bar?

流过昼夜 提交于 2021-01-05 08:46:25
问题 I am learning Google cloud messaging and firebase messaging is working fine, but when a user do not click at the notification to open the app and instead goes directly to app by manually opening it and bringing to foreground, the notification stays. I want those notification message related to my app go away when the app comes to foreground. How can I achieve this ? 回答1: It thinks there is no way to do this in documentation. But you can try this. You can just go to your MainActivity.java in

Service to keep alive FirebaseMessagingService even if app is not running and show notifications with Data payload

拜拜、爱过 提交于 2021-01-02 22:53:26
问题 I am working in a application that uses FCM notifications, when app is running (foreground or background) the notification receives but when i clear the app from my recent apps i do not receive any notification i am using FirebaseMessagingService. So i want to create a service that will keep alive myService which is extending FirebaseMessaging service even if app is not running or killed. 回答1: I found a reason for this problem when you Release-APK is not from GPlay some mobile companies block

Service to keep alive FirebaseMessagingService even if app is not running and show notifications with Data payload

烈酒焚心 提交于 2021-01-02 22:50:48
问题 I am working in a application that uses FCM notifications, when app is running (foreground or background) the notification receives but when i clear the app from my recent apps i do not receive any notification i am using FirebaseMessagingService. So i want to create a service that will keep alive myService which is extending FirebaseMessaging service even if app is not running or killed. 回答1: I found a reason for this problem when you Release-APK is not from GPlay some mobile companies block

Java Firebase cloud message . Send message to all

不羁岁月 提交于 2021-01-01 13:57:24
问题 I want to send a message to all device but I only send to one device this is how I send a message : I only can send message to one user , when I remove this at my method to send a message: json.put("to", tokenId.trim()); a message is not send to nobody when I have this line I send a message to only one user . How I can send a message to every one ? static void send_FCM_Notification(String tokenId, String server_key, String message) { try { URL url = new URL(FCM_URL); // create connection.

Java Firebase cloud message . Send message to all

冷暖自知 提交于 2021-01-01 13:54:56
问题 I want to send a message to all device but I only send to one device this is how I send a message : I only can send message to one user , when I remove this at my method to send a message: json.put("to", tokenId.trim()); a message is not send to nobody when I have this line I send a message to only one user . How I can send a message to every one ? static void send_FCM_Notification(String tokenId, String server_key, String message) { try { URL url = new URL(FCM_URL); // create connection.

How can I disable firebase notification on android client app

寵の児 提交于 2021-01-01 04:57:10
问题 I want to disable firebase notification service when the user turns off notification through settings. I found questions on this topic: Firebase on Android - I want to disable firebase notifications on Android client and android FCM enable/disable from application settings but answers are an alternative way for ignoring notifications. Is there any other way to unregister firebase notifications. Thankyou 回答1: Use this. FirebaseMessaging.getInstance().unsubscribeFromTopic("X"); 回答2: I spent a

Flutter FCM with Laravel

若如初见. 提交于 2021-01-01 04:22:52
问题 I am Using Laravel for my App backend and want to send push notification to my flutter app by topic. Now I implemented firebase messaging into my flutter app. as _registerOnFirebase() { _firebaseMessaging.subscribeToTopic('all'); _firebaseMessaging.getToken().then((token) => print(token)); } void getMessage() { _firebaseMessaging.configure( onMessage: (Map<String, dynamic> message) async { print('received message'); }, onResume: (Map<String, dynamic> message) async { print('on resume $message

Deep Link with Push Notification - FCM - Android

拈花ヽ惹草 提交于 2020-12-28 13:13:11
问题 What I want: I want to send push notification to users. When user tap on that notification, user should navigate to specific activity. What I did: I created one deep link in Firebase console. I implemented FirebaseInstanceIdService & FirebaseMessagingService as well. I'm able to catch Firebase message which I sent from Firebase console. What is the issue: I'm not able to catch the dynamic link what I have created in Firebase console. My code is like below. MyFirebaseInstanceIDService.java

Deep Link with Push Notification - FCM - Android

我与影子孤独终老i 提交于 2020-12-28 13:12:24
问题 What I want: I want to send push notification to users. When user tap on that notification, user should navigate to specific activity. What I did: I created one deep link in Firebase console. I implemented FirebaseInstanceIdService & FirebaseMessagingService as well. I'm able to catch Firebase message which I sent from Firebase console. What is the issue: I'm not able to catch the dynamic link what I have created in Firebase console. My code is like below. MyFirebaseInstanceIDService.java