firebase-cloud-messaging

Firebase Notification not received on device when sent via cURL/PHP

安稳与你 提交于 2019-12-18 16:33:22
问题 I have an iOS app which is live on the app store. I am able to send push notifications to iOS devices which have the app installed, but only when I send them from the Firebase console. When I try to send push notifications via a cURL request, the response from the server indicates that I was successful but the message isn't received on the device. I have tried this with both multicast and single recipient payloads. I must be missing something more fundamental, but I can't see it. Here is my

Is it possible to use Firebase Messaging with Google Analytics in Android?

这一生的挚爱 提交于 2019-12-18 15:29:25
问题 I started using Firebase Cloud Messaging for an Android app and now I'm trying to add Google Analytics (not Firebase analytics) to the same app. The problem is that when creating google-services.json for Analytics, it ignores FCM. I'm using the same google account to create both json files. I read that when enabling the second service (in this case Analytics) the json should update adding both Messaging and Analytics but maybe this only works within Firebase services? I could use Firebase

Firebase Cloud Messaging Notification Vibration

霸气de小男生 提交于 2019-12-18 12:26:53
问题 Is it possible to make an Android device vibrate when receiving notifications in the background with Firebase Cloud Messaging? From the Syntax Reference I have seen and tested that sound is supported, but no info on vibration. Or is it somehow possible to provide a customized implementation for this notification where I would directly set the vibration? 回答1: You should mark yourself as a correct answer. On a sidenote, if you do send a Notification and a Data payload, use "notification":{

FCM remote notifications payload for iOS and Android

做~自己de王妃 提交于 2019-12-18 11:50:45
问题 We are using FCM to send remote notifications for both iOS and Android. Following are the payloads we are sending from backend. options = { notification: { title: "title", body: body, sound: 'default' }, priority: "high", content_available: true, data: { type: 'type', id: id, } } This works for ios and android. But for some reason, android side we need to send title , body and sound for keys in data payload and need to remove notification payload. Now the notifications are not receiving ios

Google Firebase Push Notifications for iOS are not working in production environment

北战南征 提交于 2019-12-18 11:48:43
问题 I'm using Google Firebase Cloud Messaging API (FCM) to send push notifications to my iOS app. I could get push-notifications working successfully when I test the app on a device with Development provisioning profiles + development push notification(sandbox) certificates. However I'm unable to get it working on production environment. I made an ad-hoc build with correct production provisioning profiles and production push notification certificates. And synced an IPA file to a device via iTunes

Cannot resolve symbol com.google.firebase.messaging.Message

不问归期 提交于 2019-12-18 09:52:56
问题 I'm following the below link to implement Firebase Messaging to send messages to multiple devices https://firebase.google.com/docs/cloud-messaging/android/send-multiple#build_send_requests I'm almost done with the implementation but just stuck at the last stage (Build send requests) In the below code Message message = Message.builder() .putData("score", "850") .putData("time", "2:45") .setTopic(topic) .build(); I'm getting the error Cannot resolve symbol 'Message' Also in the line String

Cannot resolve symbol com.google.firebase.messaging.Message

▼魔方 西西 提交于 2019-12-18 09:49:57
问题 I'm following the below link to implement Firebase Messaging to send messages to multiple devices https://firebase.google.com/docs/cloud-messaging/android/send-multiple#build_send_requests I'm almost done with the implementation but just stuck at the last stage (Build send requests) In the below code Message message = Message.builder() .putData("score", "850") .putData("time", "2:45") .setTopic(topic) .build(); I'm getting the error Cannot resolve symbol 'Message' Also in the line String

Firebase messaging without server XMPP server - Proposal

浪尽此生 提交于 2019-12-18 09:49:25
问题 I know this question has been asked too many times. But I have something to propose and need to know if it makes sense. I am already using Firebase database. All I need a server is to make a POST call to Firebase messaging. But what if the app makes the same POST call? Now I understand that there is a security risk aligned with this model. Apps can be decompiled and the server key can be extracted. But as I am already using Firebase database, what if I keep the key in my database and request

Push notifications using FCM not received when app is killed android

丶灬走出姿态 提交于 2019-12-18 09:15:19
问题 public class Notification extends FirebaseMessagingService { private static final String TAG = "MyFirebaseNotification"; @Override public void onMessageReceived(final RemoteMessage remoteMessage) { Map<String, String> data=null; Log.v(TAG,"notification Received"); Log.v(TAG,remoteMessage.getData().toString()); } } Method is not being called when application got killed. How do i receive notifications even if the app is killed,not in foreground or background. 回答1: Please check the following

FCM showing duplicate notification when app is in background

空扰寡人 提交于 2019-12-18 08:25:48
问题 I implemented FCM in my project. Push notification is working as expected, onMessageReceived is called when a notification is received. This is true when app is in the foreground. However, when the app is in the background, the system tray always display a duplicate notification when one arrives (e.g. when Notification A is received, system tray display 2 Notification A) How to fix this? EDIT: added code I extended FirebaseMessagingService class and have this in the onMessageReceived method