firebase-cloud-messaging


Firebase Cloud Messaging's getToken() pending in Chrome Extension

喜你入骨 提交于 2020-01-25 09:26:05
问题 I want to use Firebase Cloud Messaging to show push notifications in my extension. I followed the official doc and successfully got the permission, but I am unable to get the Firebase token using messaging.getToken() . The method returns a promise but it is neither resolved nor gives an error. When I call it in console directly, all I get is a Promise object with Pending status. I have searched many questions but no solution applied to mine. Here is the initialization code I have written in

Flutter - how to get current context?

≯℡__Kan透↙ 提交于 2020-01-25 08:41:13
问题 I am using Firebase cloud messaging for notifications, and i want to show a dialog or snackbar once i receive a notification when i am inside the application, my problem is that i am initializing the firebase configuration at the top of my widget tree (Splash screen once the app is starting) _fireBaseMessaging.configure( onMessage: (Map<String, dynamic> message) async { dynamic data = message['data']; ................ // Adding a snackbar/alertdialog here doesn't work }, ); obviously if i set

Can i use service worker caching function in firebase-messaging-sw.js?

核能气质少年 提交于 2020-01-25 06:49:12
问题 So I want to cache my web app assets in a service worker, but I already have firebase messaging SW, can I put my code there or create a new service worker? 回答1: This is what worked for me: - create two service workers: sw.js (for caching and fetch handler) and the firebase-messaging-sw.js as mentioned, sw.js will handle your caching. DO NOT create a "push" or "notificationclick" handler in sw.js create your "push" and "notificationclick" handlers in firebase-messaging-sw.js. I do NOT call any

Firebase FCM notification image won't show

你说的曾经没有我的故事 提交于 2020-01-25 04:22:30
问题 I am using FCM in my project and when trying to test the incoming notifications with the firebase "compose notification" feature I am putting a title, a body and an image URL to the message and it shows what it should look like - a rich notification with image. But the notification that is being sent to me is a normal one without any image. here is the firebase UI and what is suposed to happen - My issue is that I am getting only the text, without the image. here is my

Firebase Admin SDK Java Backoff/retry

烈酒焚心 提交于 2020-01-24 21:50:07
问题 In implementing a Firebase Server Environment I ran across some requirements in the documentation: https://firebase.google.com/docs/cloud-messaging/server#role Namely, the requirement that the server provide facilities for backoff/retry. Is there some direction as to how the Firebase Admin SDK usage should be wrapped in such logic or is the logic contained within the SDK itself? I did see this in the Firebase Admin SDK release notes that does mention handling of retry for 500 response codes:

Firebase Spark Plan Cloud Messaging Limits [duplicate]

一世执手 提交于 2020-01-24 21:22:21
问题 This question already has answers here : Firebase FCM Usage Limits [closed] (3 answers) Closed 2 years ago . I am trying to implement Firebase messaging service in my Application. The only use I make of firebase is to send data from my own created Web services and on the Android App side to receive these messages. I don't use any other feature at all. I store the device token IDs on my own Database. Suppose a million users have installed the App. Will there be any disruptions arising? I can't

Does FCM support the new apns-push-type for iOS 13

孤街浪徒 提交于 2020-01-24 12:09:10
问题 We currently have a solution to send the push notification from FCM to APNS and then to iOS. Due to the introduction of iOS13, the APNS now requires apns-push-type in any incoming payload that specifies whether it's an alert notification, background notification, or any other type. I am wondering how to add this information in the message sent to the FCM. Currently we use pyFCM to send messages to FCM. And we follow this page as reference: https://firebase.google.com/docs/cloud-messaging/http

Does FCM support the new apns-push-type for iOS 13

筅森魡賤 提交于 2020-01-24 12:09:04
问题 We currently have a solution to send the push notification from FCM to APNS and then to iOS. Due to the introduction of iOS13, the APNS now requires apns-push-type in any incoming payload that specifies whether it's an alert notification, background notification, or any other type. I am wondering how to add this information in the message sent to the FCM. Currently we use pyFCM to send messages to FCM. And we follow this page as reference: https://firebase.google.com/docs/cloud-messaging/http

How do I add an analytics label to data messages with the java Firebase Admin SDK?

被刻印的时光 ゝ 提交于 2020-01-24 10:27:05
问题 As of July 1, Firebase requires the addition of labels to messages in order for analytics to show about the number of data message sends etc. 'Starting Monday, 1 July 2019, you will be able to filter data by an analytics label. Data messages sent without an analytics label might not be represented in this dashboard after that date.' The problem is that the link to the documentation provided by firebase here, does not help. It only refers to HTTP requests whilst I am using the Firebase Admin

myfirebasemessaging service is not assignable to android.app.service

假如想象 提交于 2020-01-24 06:57:24
问题 This is my manifest file. I have a problem login in on my app and I am getting this error. my firebase messaging service is not assignable to android.app.service. What might be the problem? <!-- [START firebase_service] --> <service android:name=".MyFirebaseMessagingService"> <intent-filter> <action android:name="com.google.firebase.MESSAGING_EVENT" /> </intent-filter> </service> <!-- [END firebase_service] --> <!-- [START firebase_iid_service] --> <service android:name="

工具导航Map