firebase-cloud-messaging

Android notification icon issue

强颜欢笑 提交于 2020-01-21 08:58:46
问题 I have a strange issue. I have two way to send notifications in my Android app; one from the Android service and the other through FCM. The scenarios are as follows: Regardless of whether the app is running or not, the icon of the notification sent from the Android service appears correctly. When the app is running, the notification icon appears still appears correctly if I send the notification via FCM. But if the app isn't running and I send the notification via FCM, a white square is

Can we push only data message from Firebase Notification console [duplicate]

南笙酒味 提交于 2020-01-20 08:28:10
问题 This question already has answers here : Unable to send data message using firebase console (4 answers) Closed 3 years ago . I have implemented FCM successfully in my project. Is it possible to push only data message from Firebase console. 回答1: Unfortunately, no. When sending messages through the Firebase Console, it will be treated as a notification payload and will be handled as such. You can however, include custom key-value pairs in the Advance Options section in the console, this will be

Can we push only data message from Firebase Notification console [duplicate]

蹲街弑〆低调 提交于 2020-01-20 08:27:05
问题 This question already has answers here : Unable to send data message using firebase console (4 answers) Closed 3 years ago . I have implemented FCM successfully in my project. Is it possible to push only data message from Firebase console. 回答1: Unfortunately, no. When sending messages through the Firebase Console, it will be treated as a notification payload and will be handled as such. You can however, include custom key-value pairs in the Advance Options section in the console, this will be

error: package com.google.firebase.messaging does not exist

最后都变了- 提交于 2020-01-19 17:22:09
问题 I'm trying to build my project, but when I do, I get this error: "error: package com.google.firebase.messaging does not exist", along with other 4 errors of the same kind. package md5f64326b4609986d97810cf2ced03c9ce; public class MyFirebaseMessagingService extends com.google.firebase.messaging.FirebaseMessagingService implements mono.android.IGCUserPeer { /** @hide */ public static final String __md_methods; static { __md_methods = "n_onMessageReceived(Lcom/google/firebase/messaging

How to subscribe to topics with web browser using Firebase Cloud Messaging

[亡魂溺海] 提交于 2020-01-19 07:24:50
问题 I'm trying to find a way to send a notification using Firebase Cloud Messaging to all of my app's users, but I have a web-only app. I've seen solutions that appear to be for Android/iOS, which basically involves having the users auto-subscribe to a topic called "allDevices" and then sending a notification to all users subscribed to that topic. I just can't seem to find any documentation on how to have a web-based user subscribe to a topic. Does anyone know if that's possible, and if it is, is

FCM: Track status FCM push notification

拈花ヽ惹草 提交于 2020-01-17 07:49:08
问题 How to track FCM push notification status? If it is delivered then to how many devices it has been delivered. I want add this statistics to my dashboard for tracking purpose. 回答1: https://support.google.com/googleplay/android-developer/answer/2663268?hl=en See here it is well explained about FCM statistics. You can add your app here and see status of sent notification. 来源: https://stackoverflow.com/questions/40781933/fcm-track-status-fcm-push-notification

FCM notification messages not collapsing

限于喜欢 提交于 2020-01-17 05:46:25
问题 I noticed that when i send FCM payload when app is in background, i see the notification message being shown which is as per docs, but i see native notifications for every notification message received. When my app was in the background, i received 3 push messages (with notification payload) and i now see 3 native notifications in the notification tray. Why are they not getting collapsed ? By default, according to FCM docs, all notification messages are collapsible. Reference to the doc:

Firebase Cloud Messaging Localization Arguments Error

隐身守侯 提交于 2020-01-17 01:36:10
问题 I am providing the following Payload to admin.messaging().sendToDevice(fcmToken, message); var message = { notification: { title_loc_key: "NOTIFICATION_TITLE", body_loc_key: "NOTIFICATION_BODY", body_loc_args: ["Body Arg"], sound: 'default' } }; However this generates the following error: Messaging payload contains an invalid value for the "notification.body_loc_args" property. Values must be strings. I don't see how "Body Arg" is not a string. I also tried specifying a string but this also

Display Custom Data from Firebase Cloud Messaging console to Flutter app?

≯℡__Kan透↙ 提交于 2020-01-16 12:27:49
问题 Hi is there any way to use the key and value that I've set in my Firebase Cloud Messaging console, Additional Options for push notification to DISPLAY inside my Flutter app? I'm having a hard time making this work tbh, Example, I've used a url for key and a link for my value in my FCM console. What I exactly want is like this: When I send a push notification, it display to a custom screen/url_launcher/widget within my app and that screen/url_launcher/widget shows the data I've inputted in FCM

Is there any way how to get data from push notification using FirebaseMessagingService in background?

十年热恋 提交于 2020-01-16 10:11:52
问题 I'm using FirebaseMessagingService for my push notifications. It is working as intented in app. onMessageReceived is called, I can get notification title and body + data payload and send reaction depends on payload data to my Activity using LocalBroadcastManager . But there is problem with background push notification. This will only show notification in background, but it is not created in onMessageReceived because this function cannot be called if app is in background. According to