firebase-cloud-messaging

iOS not receiving Firebase Push Notification sent through the API

ⅰ亾dé卋堺 提交于 2019-12-30 08:18:12
问题 I'm using Google's Firebase Cloud Messaging to send push-notifications to my iOS and Android applications. The push-notifications sent through the Cloud Messaging console work just as intended, however when I send a push-notification through the API, the iOS application only receives it when in foreground. On Android, it is working correctly (both in foreground and background). Reading the documentation, the iOS system would then transfer the "notification" object to the system tray, as

How to refresh FCM Token on user Logout?

▼魔方 西西 提交于 2019-12-30 07:12:11
问题 I am getting the FCM first time and save it to my userDefaults. Now When user logs out, how can I refresh the FCM token again? I have searched the docs and many other asked questions, but didn't find a better solution. Thanks in advance. 回答1: The FCM Token is an Instance ID token, it represents the installed app and not the signed in user. Generally once the app remains installed it will have the same token no matter what user is signed in. You would have to manage what user is associated to

How to refresh FCM Token on user Logout?

二次信任 提交于 2019-12-30 07:12:05
问题 I am getting the FCM first time and save it to my userDefaults. Now When user logs out, how can I refresh the FCM token again? I have searched the docs and many other asked questions, but didn't find a better solution. Thanks in advance. 回答1: The FCM Token is an Instance ID token, it represents the installed app and not the signed in user. Generally once the app remains installed it will have the same token no matter what user is signed in. You would have to manage what user is associated to

Push notification not showing in Android foreground

拟墨画扇 提交于 2019-12-30 06:26:31
问题 I've used react-native-fcm for remote notification in android and iPhone. react-native-fcm In Android foreground I'm not be able to getting remote notification in notification bar. In background mode I'm able to getting notification successfully but some how in foreground doesn't. Android Manifest.xml <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.nusape"> <application> <receiver android:name="com.evollu.react.fcm.FIRLocalMessagingPublisher"/> <receiver

Not receiving FCM Push Notification for web on localhost

梦想的初衷 提交于 2019-12-30 05:44:08
问题 So I need to implement web push notifications in our web app, I have successfully setup the firebase cloud messaging in my app with the help of docs, I'm able to ask the user to allow permission for notifications and get the token id as well if he accepts the permission. The thing is when I try to send a notification to test to the generated token, I'm getting a response that the message is sent, but I'm not able to receive it on the client side. My index.html <head> <script src="https://www

Cannot find symbol “messaging” in com.google.firebase.messaging.FirebaseMessagingService

爱⌒轻易说出口 提交于 2019-12-30 04:49:25
问题 I am trying to access FirebaseMessagingService using firebase 9.2.1 library. I have successfully created a project then download the JSON file. I have finally integrated this JSON file with my project. FirebaseInstanceIDService is running fine but showing error with FirebaseMessagingService. So i checked my project folder inside android studio. Then i find that firebase-messaging 9.2.1 library is missing. How can i resolve this issue. I have already upgraded all of the SDK libraries. Please

IOS data notifications with FCM

99封情书 提交于 2019-12-30 00:04:46
问题 I am using FCM (firebase cloud messaging) to send "custom" data notifications to an IOS app. From what I understand, we use notification messages when you want FCM to handle displaying a notification on your app's behalf. And we use data messages when you just want to process the messages only in your app. It's by design. Problem I am facing is that that Device/InstandID token is unique to installed app and not the user logged in the app. So to solve this, I am sending intended user tag in

Topic Won't Save in Firebase

◇◆丶佛笑我妖孽 提交于 2019-12-29 09:25:09
问题 I'm trying to let a user subscribe to a Topic and save it in Firebase. I've followed the guides from firebase.google.com and have added the following code when a user taps a button: [[FIRMessaging messaging] subscribeToTopic:@"/topics/sampletopic"]; Nothing happens though when I test clicking this button. I've added what is necessary to the podfile. What am I missing? edit: where does this even show up in Firebase? Where can I see my saved topics? 回答1: A topic is created automatically so long

HTTP Post Request: Error 400, Firebase Topic Messaging

这一生的挚爱 提交于 2019-12-29 09:12:20
问题 I'm trying to implement Firebase Topic Messaging in an Android application, and I'm attempting to build a HTTP post request, and I'm receiving a response code of 400. I have looked at various solutions but none of them have seemed to help. Here is where I call the subclass of AsyncTask: try{new FirebaseSendMessage().execute("Hello world");} catch (Exception e) { Log.d("Exception", e.toString()); } Here is my Async Task class's subclass. class FirebaseSendMessage extends AsyncTask<String,

Keep data from the Firebase Realtime Database always in sync

若如初见. 提交于 2019-12-29 08:08:12
问题 I'm currently re-working an app of mine which updates it's internal SQLite database by fetching raw data from an website, not an official API. As this is quite error-prone I'd like to move the data processing out of the client into an backend server. The idea is to have a script running on the server multiple times a day - similar to the client behaviour before - and storing the data in a Firebase Realtime Database. Then, all clients no longer have to process the data themselves but rather