firebase-cloud-messaging

FCM topic - Cannot subscribe to topic: xxx with token: (null) - iOS

≡放荡痞女 提交于 2019-12-22 01:13:23
问题 I'm getting this error from Firebase Messaging API: [Firebase/Messaging][I-FCM002010] Cannot subscribe to topic: /topics/testTopic with token: (null) But before: Messaging.messaging().subscribe(toTopic: "/topics/testTopic") I'm printing out the token like this: print("TOKEN: \(InstanceID.instanceID().token() ?? "NO TOKEN")") The result is: TOKEN:cXPhGQ_inE4:APA91bEKZF5depHmIm9gDliCFRCRcnJf5LYy5FMg6nhpWvKU3o3HEtr1WTBHUiCZXT4XzhVg2oqXzhtfrgf83brtLdqXii546644ciMPO80tri4JPueQBClKbaomEfoh54ku8E2lw

I cannot receive any FCM message anymore in background application

我的未来我决定 提交于 2019-12-21 20:54:28
问题 I cannot receive any data message anymore in my application when it's in background. Notice that it worked perfectly in my application until very recently. Maybe it stopped working after recent updates in my development environment, I can't say.... So I tried to make the test with the quickstart-android project, to see it works better. And the answer is no! I have no doubt that quickstart-android project is well configured to use FCM capabilities... I send the following message from Advanced

“registration_ids” field is not a JSON array (Firebase)

懵懂的女人 提交于 2019-12-21 13:03:20
问题 I am facing problem with Firebase "registration_ids". When I send the request from Rest Client i get the successful response. {"multicast_id":4650719213012935695,"success":2,"failure":0,"canonical_ids":0,"results":[{"message_id":"0:1468837777484579%214918aff9fd7ecd"},{"message_id":"0:1468837777484484%214918aff9fd7ecd"}]} But when I call same php script from my Android application it gives me error in the response. (I got the response in Charles Proxy) "registration_ids" field is not a JSON

Can I send a silent push notification from a Firebase cloud function?

倖福魔咒の 提交于 2019-12-21 13:01:45
问题 Is it possible to send a silent APNs (iOS) remote notification from a Firebase Cloud Function? If so, how can this be done? I want to send data to iOS app instances when the app is not in the foreground, without the user seeing a notification. I currently send a notification that can be seen by users: const functions = require('firebase-functions'); const admin = require('firebase-admin'); admin.initializeApp(functions.config().firebase); exports.sendNotifications = functions.database.ref('

How to instantiate Firebase Cloud Messaging in Angular2

巧了我就是萌 提交于 2019-12-21 12:29:48
问题 How to instantiate Firebase Cloud Messaging in Angular2 / TypeScript / AngularFire2 ? It's described here for JavaScript: https://firebase.google.com/docs/cloud-messaging/js/client 回答1: The firebase.messaging() function takes the Firebase app instance as an optional parameter. To wire it up with AngularFire2 , you could let AngularFire2 perform the app initialization and create the Firebase app instance and could then inject the app instance (into a service, for example) and pass it to

FCM data message not received in Android when the application is in background

五迷三道 提交于 2019-12-21 12:18:59
问题 I face a very strange problem; I had a previous version of my application published using GCM 8.4.0 which worked fine. I updated some code, without changing anything about GCM and I realised that the messages where not received anymore when the application was in background. This on several different devices. As I was unable to find any explanation, I migrated to FCM. I made few unsuccessful attempts and it began to work !?! Then I was able to send several different messages successfully

Push not received when app is killed

非 Y 不嫁゛ 提交于 2019-12-21 12:15:32
问题 I am using the new FCM to push message from my server to my android app. { "to" : "APA91bHun4MxP5egoKMwt2KZFBaFUH-1RYqx...", "data" : { "Nick" : "Mario", "Room" : "PortugalVSDenmark" } } I am able to push messages to my app using the new FCM however, when I kill the app (long press on home button then slide the app to the left), push messages are not delivered any more. Why? 回答1: Check the raw payload, what is received from server. body and title key have to have under notification key to get

Notifications tracking when using FCM

六月ゝ 毕业季﹏ 提交于 2019-12-21 05:12:07
问题 Is it possible to track the notification status, whether it was opened or canceled by the user, when I send a push notification without using firebase services dashboard? I am using Advanced REST client and I would like to record data about the notifications status when sending payload to https://fcm.googleapis.com/fcm/send 回答1: Conversion tracking is only built into Firebase Notifications. I don't think we have a public API to feed into those charts. But if you send your messages through

FCM behavior when offline for iOS

帅比萌擦擦* 提交于 2019-12-21 02:47:23
问题 I'm having trouble figuring out how FCM behaves when I send a notification to an iOS device that is offline (e.g. in airplane mode, or turned off). The documentation on the time_to_live property mentions that Currently, time_to_live is not supported for notification messages on iOS. but doesn't provide an explanation of what is done instead. I've tried testing it, and it seems like a push notification sometimes goes through, and sometimes does not, regardless of what I set the time_to_live

Firebase handleIntent AbstractMethodError

久未见 提交于 2019-12-20 17:47:54
问题 When I receive a push notification on Android, I get the below error. I can't really seem to find any information about it. Can anyone help? I am really at a loss. FATAL EXCEPTION: pool-1-thread-1 Process: com.mycompany.myerror, PID: 22712 java.lang.AbstractMethodError: abstract method "void com.google.firebase.iid.zzb.handleIntent(android.content.Intent)" at com.google.firebase.iid.zzb$1.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) at