firebase-cloud-messaging

Firebase Cloud Messaging click_action format is platform specific?

女生的网名这么多〃 提交于 2019-12-19 08:04:13
问题 I am using Firebase Cloud Messaging to send notifications to clients of my app. The clients can be any of the three supported platforms (ios, android, web). I want the user to be able to click on the notification to launch the app. For this i have to specify a click_action in the notification. For ios and android that seems to be a simple string. For web it would be an url. How am i supposed to send a notification that works for a potentially mixed set of devices? Do i have to separate the

NotificationCompat.Builder(getApplicationContext(), CHANNEL_ID) not working on Oreo Firebase notification

痴心易碎 提交于 2019-12-19 07:25:08
问题 I am trying to show notification using Firebase in Oreo version so it's not showing when I get Solution NotificationCompat.Builder(this, CHANNEL_ID) but it's showing me like this and my build.gradle file is apply plugin: 'com.android.application' dependencies { compile project(':library') compile project(':camerafragment') compile 'com.google.android.gms:play-services:11.0.0' compile 'com.squareup.picasso:picasso:2.5.2' compile 'com.mcxiaoke.volley:library:1.0.17' compile 'com.android.support

Firebase on iPad's Safari; Can't find variable: Notification

左心房为你撑大大i 提交于 2019-12-19 06:31:14
问题 I use Firebase's cloud messaging, but it won't work on iPad and iPhone. It's the simplest usage i can do with it. I just did all the tutorial about offsite notifications but i got this error directly in the Firebase's script. 回答1: The firebase JavaScript library you're using is incompatible with Safari on iOS. The Safari browser that runs on iOS devices is not the same as the desktop build of the application and does not have the same feature set. In this specific case, iOS Safari is throwing

How to retrieve notification message intent.getExtras() when app is background FCM

泄露秘密 提交于 2019-12-19 05:32:08
问题 I am using FCM for Simple notification When the app is in foreground, everything working properly. I am getting a notification plus the data message inside the onMessageReceived method. But when app is in background, I am getting notification in system tray. And when I click on the control, it goes to the main activity. And When I parse intent.getExtras(); , I am getting only this key data - google.sent_time , from , google.message_id , collapse_key . How to get the notification message title

Firebase FCM push, getting Error Missing Registration | Android

。_饼干妹妹 提交于 2019-12-19 03:19:18
问题 I have seen this topic discussed before, but I think it's not the same scenario. I'm trying to send push notification from one device (going to be an admin device) through FCM (Firebase Cloud Messaging) to all other devices, and i'm going exactly by their docs. I have tried to subscribe to topics or keep it simple still getting the same error : MissingRegistration String jsonData = "{\"to\":\"/topics/news\",\"notification\":{\"title\":\"title\",\"body\":\"text\" }}"; byte[] postData =

Firebase Push Notification [duplicate]

无人久伴 提交于 2019-12-19 03:09:16
问题 This question already has answers here : Push notification works incorrectly when app is on background or not running (2 answers) Closed 3 years ago . I implemented Firebase for push notification in my Android app. I implemented two services for register the token and for create the notification when it is detected. When my app is launch it's working but when my app is closed it doesn't working. public class FirebaseinstanceIdService extends FirebaseInstanceIdService { @Override public void

Firebase onMessageReceived not called

为君一笑 提交于 2019-12-19 02:27:39
问题 FCM service: public class FCMService extends FirebaseMessagingService { @Override public void onMessageReceived(RemoteMessage remoteMessage) { Log.i(Constants.TAG,"onMessageReceived"); Log.i(Constants.TAG, "From: " + remoteMessage.getFrom()); if (remoteMessage.getData().size() > 0) { Log.d(Constants.TAG, "Message data payload: " + remoteMessage.getData()); } if (remoteMessage.getNotification() != null) { Log.d(Constants.TAG, "Message Notification Body: " + remoteMessage.getNotification()

FCM - Difference between Downstream Message and Upstream Message

感情迁移 提交于 2019-12-18 19:09:49
问题 I have been studying materials related to Web push notification from FCM Messenger. While I came across downstream message and upstream message, apparently HTTP server only allows downstream message while XMPP server allows upstream message. I have trouble understanding the difference between downstream and upstream message and the details are not well explained on FCM. I tried to search online but I have no luck. Please do help me as I am new to coding. 回答1: To put it on Layman's terms,

All firebase libraries must be either above or below 14.0.0

隐身守侯 提交于 2019-12-18 18:51:37
问题 I have checked my app build.gradle file and these are the only lines that are related to firebase in them /*** * Firebase */ implementation 'com.google.firebase:firebase-core:15.0.0' implementation 'com.google.firebase:firebase-messaging:15.0.0' implementation('com.crashlytics.sdk.android:crashlytics:2.9.1@aar') { transitive = true } implementation 'com.google.firebase:firebase-ads:15.0.0' I do not have any library that makes use of firebase so I don't think there can be an issue with a

How many topics can we make in Firebase Cloud Messaging?

我怕爱的太早我们不能终老 提交于 2019-12-18 16:55:30
问题 I'm building an app where I am using Firebase Cloud Messaging. But I have some doubts. I want to know how many topics we could make in one app instance? In official docs it writes that when a single app instance subscribes to an excessive number of topics it retrieves error TOO_MANY_TOPICS . I want to know how many topics is allowed. I know that we don't have constraints about number of subscribers and that is okay, but I want to know how many topics could we make in one app instance.