firebase-cloud-messaging

set FCM high-priority when using firebase-admin

|▌冷眼眸甩不掉的悲伤 提交于 2020-07-19 06:19:29
问题 I have the following code which uses firebase-admin to send messages using Firebase cloud messaging Message message = null; message = Message.builder().putData("From", fromTel).putData("To", toTel).putData("Text", text) .setToken(registrationToken).build(); String response = null; try { response = FirebaseMessaging.getInstance().sendAsync(message).get(); responseEntity = new ResponseEntity<String>(HttpStatus.ACCEPTED); } catch (InterruptedException | ExecutionException e) { e.printStackTrace(

Send notification from device to another with firebase in Android [duplicate]

别等时光非礼了梦想. 提交于 2020-07-16 10:33:30
问题 This question already has answers here : How to send one to one message using Firebase Messaging (5 answers) How to send Device to device notification by using FCM without using XMPP or any other script.? (3 answers) Closed yesterday . I build an application that book lessons, in the application there are student account and teacher account. So I need when the student book the lesson then the teacher receive a notification with the details of the lesson. I use Firebase Realtime database to

How do I correctly register a plugin with the FCM plugin

雨燕双飞 提交于 2020-07-10 10:26:27
问题 I am using https://pub.dev/packages/firebase_messaging v6.0.16 and flutter v1.17.5 And I am trying to call a plugin inside my myBackgroundMessageHandler on the line where it says AppAvailability.launchApp('com.companyname.appname'); class CloudMessagingService extends NotificationService { final FirebaseMessaging _firebaseMessaging = FirebaseMessaging(); void configure() { if (Platform.isIOS) _firebaseMessaging.requestNotificationPermissions(IosNotificationSettings()); _firebaseMessaging

flutter: subscribing user to different topics in one collection for push notifications fcm

不羁岁月 提交于 2020-07-10 04:50:56
问题 i wanna subscribe my users to different "language" topics according to their preference so they receive notifications in the language they want in my firestore i have a collection called notifications inside its document(default) i have two more collections .. english and arabic. now in my shopping app i subbed the user to english topic to test if it works _fcm.subscribeToTopic('english'); and here's my index.js code for cloud fuctions: const functions = require('firebase-functions'); const

FCM Data message is not navigating to desired fragment when app is in background

一笑奈何 提交于 2020-07-10 03:18:08
问题 I have an app with a somewhat complex flow. There is a launcher activity (SplashActivity), then a MainActivity, which has five fragments, then in the fifth fragment, there is the DesiredActivity which has three fragments, one of them being the DesiredFragment. When the app is in foreground and we click on the push notification (data message type), the DesiredFragment opens, no issues there, but when the app is in background, the MainActivity opens, instead of the DesiredFragment, on click of

FCM Data message is not navigating to desired fragment when app is in background

岁酱吖の 提交于 2020-07-10 03:17:25
问题 I have an app with a somewhat complex flow. There is a launcher activity (SplashActivity), then a MainActivity, which has five fragments, then in the fifth fragment, there is the DesiredActivity which has three fragments, one of them being the DesiredFragment. When the app is in foreground and we click on the push notification (data message type), the DesiredFragment opens, no issues there, but when the app is in background, the MainActivity opens, instead of the DesiredFragment, on click of

FCM Data message is not navigating to desired fragment when app is in background

﹥>﹥吖頭↗ 提交于 2020-07-10 03:17:21
问题 I have an app with a somewhat complex flow. There is a launcher activity (SplashActivity), then a MainActivity, which has five fragments, then in the fifth fragment, there is the DesiredActivity which has three fragments, one of them being the DesiredFragment. When the app is in foreground and we click on the push notification (data message type), the DesiredFragment opens, no issues there, but when the app is in background, the MainActivity opens, instead of the DesiredFragment, on click of

How can scheduled Firebase Cloud Messaging notifications be made outside of the Firebase Console?

纵然是瞬间 提交于 2020-07-09 11:54:09
问题 Inside the Firebase Console, under the Cloud Messaging view, users are able to create test notifications. This functionality also allows you to schedule the time at which the notification will send to a device or set of devices. Is it possible to create and send scheduled FCM notifications to specific devices by using firebase cloud functions and the Firebase Admin SDK? Is there an alternative way to solving this? The current way that I send scheduled messages to users is like so: const

ERROR: Failed to resolve: com.google.firebase:firebase-messaging:16.0.1

£可爱£侵袭症+ 提交于 2020-07-09 09:32:21
问题 When I add firebase cloud messaging depencency implementation 'com.google.firebase:firebase-messaging:16.0.1' I get a error : ERROR: Failed to resolve: com.google.firebase:firebase-messaging:16.0.1 My Depencency here: dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'com.google.android.material:material:1.0.0-rc01' implementation 'com.android.support:design:28.0.1' implementation 'com.google.firebase

ERROR: Failed to resolve: com.google.firebase:firebase-messaging:16.0.1

狂风中的少年 提交于 2020-07-09 09:31:12
问题 When I add firebase cloud messaging depencency implementation 'com.google.firebase:firebase-messaging:16.0.1' I get a error : ERROR: Failed to resolve: com.google.firebase:firebase-messaging:16.0.1 My Depencency here: dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'com.google.android.material:material:1.0.0-rc01' implementation 'com.android.support:design:28.0.1' implementation 'com.google.firebase