firebase-cloud-messaging

send cloud message (FCM) multiple devices single user

拟墨画扇 提交于 2021-02-05 09:38:41
问题 I have an application which is already built. Now I want to use FCM to send messages between server and users. As I understand each device has its own token which I can use to send message, and this token can be retrieved from FirebaseInstanceId.getInstance().getInstanceId() Correct me If I am wrong. The application and backed server works fine and bellow my workflow 1- User open the android app. 2- Android app take the user token ID for authentication and device token for messageing and send

send cloud message (FCM) multiple devices single user

荒凉一梦 提交于 2021-02-05 09:38:06
问题 I have an application which is already built. Now I want to use FCM to send messages between server and users. As I understand each device has its own token which I can use to send message, and this token can be retrieved from FirebaseInstanceId.getInstance().getInstanceId() Correct me If I am wrong. The application and backed server works fine and bellow my workflow 1- User open the android app. 2- Android app take the user token ID for authentication and device token for messageing and send

ios notification not working on background, foreground

怎甘沉沦 提交于 2021-02-05 09:33:34
问题 I want to use notification when app pause mode(foreground) and app kill (background), Only notification working on when the app opens (app running). I used this on Flutter project. enable Background Mode(Background fetch, Remote notifications) and push notification @UIApplicationMain @objc class AppDelegate: FlutterAppDelegate { override func application( _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { Messaging

ios notification not working on background, foreground

牧云@^-^@ 提交于 2021-02-05 09:33:09
问题 I want to use notification when app pause mode(foreground) and app kill (background), Only notification working on when the app opens (app running). I used this on Flutter project. enable Background Mode(Background fetch, Remote notifications) and push notification @UIApplicationMain @objc class AppDelegate: FlutterAppDelegate { override func application( _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { Messaging

FirebaseError: Messaging: This browser doesn't support the API's required to use the firebase SDK. (messaging/unsupported-browser)

时光毁灭记忆、已成空白 提交于 2021-02-05 08:45:17
问题 I'm developing a Ionic 5 app both for Android and iOS. I'm using angularfire https://github.com/angular/angularfire/tree/v5 and I'm having some issues. In particular, this library works good when using Firestore, but when I try to use Cloud Messaging to receive notifications on my Android device, it raises an error: FirebaseError: Messaging: This browser doesn't support the API's required to use the firebase SDK. (messaging/unsupported-browser) . I followed the tutorial available on the

When do fcm refresh tokens created

北慕城南 提交于 2021-02-05 06:39:05
问题 I'm new to android and now looking on firebase.In my app multiple mobile numbers can be logged in. So what am doing is deleting current token by FirebaseInstanceId.getInstance().deleteInstanceId(); and after that when I log in with new number, then new token gets generated. So my question in this exactly which event triggers token regeneration event. One more thing that above code line should I have to run on thread (other than MAIN THREAD) to work 回答1: This is the service which I used for

Sending Firebase Push Notifications to Logged-in Users Only

孤者浪人 提交于 2021-02-04 21:46:19
问题 I developing an iOS application that integrates with Firebase to deliver remote push notifications. The application includes a login feature, and sending a notification using the FCM token sends it even though the user is not logged-in, and I get why that happened because the FCM token is an app-device combination not an app-user combination. But is there a workaround to guarantee that the notification is only delivered when the user is logged-in? 回答1: Push notification are not linked with

How to send direct message via Firebase from user to user?

浪尽此生 提交于 2021-02-04 21:28:50
问题 I am really rookie and need an advice. I have read documentation, and as far as i understood if you need send direct message, follow next steps: Make authentification, eventually you get Firebase TokenId and userId Send them to your server side and store it in DB When you are going to send a message you need create json and put inside topic text and resipent userId so on... Send this json via HTTP to your server side When server retrive this json , it should use Firebase API to create new

How to send direct message via Firebase from user to user?

大憨熊 提交于 2021-02-04 21:28:28
问题 I am really rookie and need an advice. I have read documentation, and as far as i understood if you need send direct message, follow next steps: Make authentification, eventually you get Firebase TokenId and userId Send them to your server side and store it in DB When you are going to send a message you need create json and put inside topic text and resipent userId so on... Send this json via HTTP to your server side When server retrive this json , it should use Firebase API to create new

Firebase onNewToken not refreshing my token

夙愿已清 提交于 2021-01-29 17:28:08
问题 So, I need to refresh my token each time it expires, but the service runing behind ddoes not trigger onNewToken() Manifest <service android:name=".fcm.MyFirebaseMessagingService" android:exported="false"> <intent-filter> <action android:name="com.google.firebase.MESSAGING_EVENT" /> </intent-filter> </service> Code class MyFirebaseMessagingService: FirebaseMessagingService() { override fun onNewToken(token: String) { super.onNewToken(token) val currentUser = FirebaseAuth.getInstance()