firebase-cloud-messaging

Firebase push notifications not working properly in some devices

百般思念 提交于 2020-04-10 08:35:07
问题 For push notification am using FCM. Iam facing some problem in VIVO V3 phones. Same code works in other devices (Blackberry,Huawei,Samsung) with all below scenarios I have tested with 3 Scenarios; When app is in foreground. When app is in background. When app is in completely kills. The first 2 condition is working well.Only the problem with 3rd one.When app kills am not getting any notification. The below code using at server side to send Data Notification message, { "to" : "bk3RNwTe3H0:CI2k

Firebase (FCM) registration token in Flutter

我怕爱的太早我们不能终老 提交于 2020-04-08 09:28:29
问题 I am trying to send notification from Java Rest Api (using Firebase Admin sdk ) to my Flutter application and it seems it requires device token to send notification and I cannot find how to get that token. I am new to Flutter and android and may be missing any of the crucial step. Please help me if you can. Thanks. 回答1: Add this to your package's pubspec.yaml file: dependencies: firebase_messaging: ^4.0.0+1 You can install packages from the command line: with Flutter: $ flutter packages get

Receiving the same token for different users when using firebase messaging

三世轮回 提交于 2020-04-06 03:19:25
问题 I use the code below to obtain a token from firebase : const messaging = firebase.messaging(); messaging.requestPermission() .then(() =>{ return firebase.messaging().getToken(); }).then(token => { saveTokentoServer(user.uid, token); }) the problem is that i receive the same token for different users. I am not able to send out targetted messages. Does anyone know how I can obtain different token for different users ? I have spent two days search for answers. Why is my web application not

How to specify sound and click_action in firebase cloud function

你离开我真会死。 提交于 2020-03-22 09:06:09
问题 I tried with the following function (node.js v8): exports.sendComNotification = functions.firestore .document('Comunicados/{comID}') .onUpdate((snap, context) => { console.log('Com triggered'); const newValue = snap.after.data(); const msg = newValue.title; var message = { notification: { title: 'Comunicado da Diretoria!', body: msg, badge: '1', sound: 'default', click_action: 'FLUTTER_NOTIFICATION_CLICK', }, topic: "Comunicados" }; return admin.messaging().send(message) .then((response) => {

How I can specify the priority on FCM message?

风格不统一 提交于 2020-03-19 05:46:05
问题 I'm using react-native-firebase to manage notifications on React-native app. I try to handle FCM message on the background when application is off without display the notification. I’m using react-native-firebase to manage notifications on React-native app. When my app is off, I try to catch FCM messages and wake up my app without displaying any notification, just as described here https://rnfirebase.io/docs/v4.2.x/messaging/introduction#Data-only-messages 1. In React Native Firebase doc,

How to configure Push mode configuration in XMPP with FCM refresh token using smack in android?

こ雲淡風輕ζ 提交于 2020-03-16 05:46:32
问题 Currently i'm using smack library for XMPP configuration and I want to do XMPP connection of Ejabberd to firebase by send RefreshToken to XMPP. I need to close connection when application is in background or kill and receive notification from Firebase but how can i send refresh token and other param as below using smack library? At the start of each session the user must register to a push mechanism. Depending on the chosen mechanism, several parameters can be passed. The push configuration

How to send a push notification from the Firebase console to a specific GCM/FCM device token ID

泄露秘密 提交于 2020-03-13 14:00:05
问题 In Urban Airship, when I am composing a notification, I can target specific users by searching for a Urban Airship channel_id (device ID): I sent from Urban Airship the push notification that I am showing above, and I received it successfully. Now I want to do the same thing, send a push notification to a specific device, but now using the Firebase console. The problem is that in Firebase, in the step where I need to specify the target , it only allows me to choose User segment or topic . I

PluginRegistry cannot be converted to FlutterEngine

醉酒当歌 提交于 2020-03-13 05:54:09
问题 As soon as I updated the flutter to version 1.12.13 I found this issue and can't fix it. I did as the firebase_messaging tutorial sent and got the following error: "error: incompatible types: PluginRegistry cannot be converted to FlutterEngine GeneratedPluginRegistrant.registerWith (registry); " My code is as follows: package io.flutter.plugins; import io.flutter.app.FlutterApplication; import io.flutter.plugin.common.PluginRegistry; import io.flutter.plugin.common.PluginRegistry

Why I do not get push notifications from Firebase in Swift?

天涯浪子 提交于 2020-03-05 15:39:42
问题 I set this code in my AppDelegate: class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterDelegate, FIRMessagingDelegate { func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { if #available(iOS 10.0, *) { let authOptions: UNAuthorizationOptions = [.Alert, .Badge, .Sound] UNUserNotificationCenter.currentNotificationCenter().requestAuthorizationWithOptions(authOptions, completionHandler: { (granted:

Why I do not get push notifications from Firebase in Swift?

隐身守侯 提交于 2020-03-05 15:36:33
问题 I set this code in my AppDelegate: class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterDelegate, FIRMessagingDelegate { func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { if #available(iOS 10.0, *) { let authOptions: UNAuthorizationOptions = [.Alert, .Badge, .Sound] UNUserNotificationCenter.currentNotificationCenter().requestAuthorizationWithOptions(authOptions, completionHandler: { (granted: