firebase-cloud-messaging

Flutter Firebase Messaging trigger onLaunch

强颜欢笑 提交于 2021-01-29 17:19:38
问题 So I have a question, because I am not fully understand something. So I wrote a simple app, to try something, so I send a message from Firebase via Firebase Cloud Messaging. I use the firebase_messaging flutter plugin (7.0.3 version). It just does a simple thing to get the message and navigate to another page. My problem is the following one, the onMessage and the onResume function works perfectly, but when the app is terminated and I click on the notification the app opens but nothing

Value of firebase functions onwrite sometimes is null

房东的猫 提交于 2021-01-29 12:54:24
问题 I'm trying to implement an Android ordering system and I'm using Realtime Database. To send notifications I'm using Firebase Functions in JavaScript. Each user is stored in the database along with their id, token to send the notification, among other data. What I'm trying to do is detect when a user receives an order and send them a notification . The problem appears here. In some cases the notification is sent and in others it is not . Viewing the logs of my "sendNotif" function I see that

Value of firebase functions onwrite sometimes is null

情到浓时终转凉″ 提交于 2021-01-29 12:03:44
问题 I'm trying to implement an Android ordering system and I'm using Realtime Database. To send notifications I'm using Firebase Functions in JavaScript. Each user is stored in the database along with their id, token to send the notification, among other data. What I'm trying to do is detect when a user receives an order and send them a notification . The problem appears here. In some cases the notification is sent and in others it is not . Viewing the logs of my "sendNotif" function I see that

Firebase Cloud Messaging example does not work

懵懂的女人 提交于 2021-01-29 09:30:22
问题 I am working through the tutorial on setting up Cloud Messaging. I followed the instructions in the video on the page https://firebase.google.com/docs/cloud-messaging/js/client?authuser=0 when I try to send the curl command I get a strange error. I have read the Cloud Messaging quickstart as well as a few other pages trying to solve the error, but to no avail. The command I entered on the command line is: curl --header "Authorization: key=AIzaSyCFCmFwwWV53PqV2M-NUZyp6lYSz43tUiQ" --header

Firebase Cloud Function error: Registration token(s) provided to sendToDevice() must be a non-empty string or a non-empty array

北慕城南 提交于 2021-01-29 09:29:31
问题 I want to send a notification to all users who are confirmed guests when the object confirmedGuests is created in the Firebase Realtime Database. So, I first create an array of all the users from confirmedGuests object. Then, I iterate through all these users and push their deviceTokens to an array of deviceTokens. The array allDeviceTokens is expected to be the array of device tokens of all users in confirmedGuests. However, when confirmedGuests object is created, the function returns an

FCM push notification when subscribers offline

耗尽温柔 提交于 2021-01-29 08:42:39
问题 I was running through FCM documentation and - I would like to understand about what would happen when the subscribers come online after a longer offline period. - Will FCM store all the push notifications received during the offline period - Will FCM deliver all the messages once the subscribers have come online 回答1: If the device is not connected to FCM, the message is stored until a connection is established (again respecting the collapse key rules). When a connection is established, FCM

Open specific custom data URL link of notification received from firebase messaging FCM

房东的猫 提交于 2021-01-29 08:16:12
问题 I created an intent that is used for a notification (i use data messages payload of firebase messaging system) in a class that extends FirebaseMessagingService. The user clicks on the notification and URL link loads. I use onNewIntent at mainActivity to get the URL and load it. The thing is that its working only when the app is in foreground and background. When the app is closed and then the notification arrive then when the user clicks the notification the app opens but the URL link does

Sending message to custom user using firebase

淺唱寂寞╮ 提交于 2021-01-29 06:03:54
问题 Id like to make a chat between two custom users. I need to send an message to custom user. scenario: User1 get User2 ID from my server My server get User2 ID from Firebase (probably using Firebase admin) My server return User2 ID to User1 User1 send message to User2 via firebase Is it possible to make? Do I have to use Firebase Admin + FCM or something else? 回答1: [Giving you a simple guideline and logic here] One of the simplest ways to implement it is by using Cloud Firestore . You need to

Desired activity not open while clicking on notification FCM

依然范特西╮ 提交于 2021-01-29 02:31:11
问题 I am doing a demo on FCM where if i click on notification it should go to notification class and show the notification message. But whenever I click notification it always redirect to default launcher activity i.e MainActivity. I have seen so many duplicate question like me but no where proper solution. Whatever solution I have found I have tried those also not working. Please look into my intent code and let me know where I have done mistake or I am missing anything else to add anything in

Xamarin Forms: Push notification is not receiving to ios device

◇◆丶佛笑我妖孽 提交于 2021-01-28 12:09:24
问题 I have done the following things: Created a project in FCM console and added ios project into it. Downloaded the GoogleService-Info.plist and added it to the xamarin forms ios project directory and set the build action as Bundlesource . On Info.plist enabled remote notification background mode. Added FirebaseAppDelegateProxyEnabled in the app’s Info.plist file and set it to No. Created a provisioning profile and distribution certificate and installed it into the keychain access. Also, mapped