firebase-notifications

Can FCM notification on Android overwrite previous one?

ⅰ亾dé卋堺 提交于 2019-12-03 13:04:00
问题 I'm using FCM to send notifications to Android devices. When the app is in background, if I send 10 notifications, the devices will show up 10 entries on the notification bar. I want FCM to make only one entry on notification bar, i.e. the newer one will overwrite old ones. I don't find a key to set this at https://firebase.google.com/docs/cloud-messaging/http-server-ref#downstream. Is there a way to do, or it is impossible? Thanks. 回答1: To achieve this, in your notification payload, use the

Firebase (FCM) Failed to fetch APNS token Error Domain=com.firebase.iid Code=1001

假装没事ソ 提交于 2019-12-03 08:51:03
问题 I'm trying to use FCM for notification. But <FIRInstanceID/WARNING> Failed to fetch APNS token Error Domain=com.firebase.iid Code=1001 "(null)" occurs so I can't get notification. What's the problem? At the console, Failed to fetch APNS token Error Domain=com.firebase.iid Code=1001 "(null)" and below is my code on Appdelegate import UIKit import CoreData import Alamofire import Firebase import FirebaseInstanceID import FirebaseMessaging @UIApplicationMain class AppDelegate: UIResponder,

GCM to FCM for Xamarin

為{幸葍}努か 提交于 2019-12-03 05:38:57
Xamarin has the predefined support to GCM (Google Cloud Messaging) which was explained in https://developer.xamarin.com/guides/cross-platform/application_fundamentals/notifications/android/remote_notifications_in_android/ As currently Google migrated from GCM to FCM (Firebase Cloud Messaging) does it work with Xamarin with same instruction or there any other Docs for integrating FCM with Xamarin? Does all features provided in Firebase can be used in Xamarin App? does it work with Xamarin with same instruction? No, it doesn't. But you can still work with GCM since Google hasn't announced that

Can FCM notification on Android overwrite previous one?

我们两清 提交于 2019-12-03 04:32:00
I'm using FCM to send notifications to Android devices. When the app is in background, if I send 10 notifications, the devices will show up 10 entries on the notification bar. I want FCM to make only one entry on notification bar, i.e. the newer one will overwrite old ones. I don't find a key to set this at https://firebase.google.com/docs/cloud-messaging/http-server-ref#downstream . Is there a way to do, or it is impossible? Thanks. To achieve this, in your notification payload, use the tag key { "notification" : { "title" : "Notification Title", "body" : "Notification Body", "tag" : "your

How to handle launch options in Swift 3 when a notification is tapped? Getting syntax problems

纵然是瞬间 提交于 2019-12-03 02:55:17
I am trying to handle the launch option and open a specific view controller upon tapping a remote notification that I receive in swift 3. I have seen similar question, for instance here , but nothing for the new swift 3 implementation. I saw a similar question (and ) In AppDelegate.swift I have the following in didFinishLaunchingWithOptions: var localNotif = (launchOptions[UIApplicationLaunchOptionsRemoteNotificationKey] as! String) if localNotif { var itemName = (localNotif.userInfo!["aps"] as! String) print("Custom: \(itemName)") } else { print("//////////////////////////") } but Xcode is

When device screen off then how to handle firebase notification?

删除回忆录丶 提交于 2019-12-02 23:10:21
问题 I will try to handle firebase notification when device screen off means wake up the device when a notification arrives. In my project notification divide into so may state so how I can wake up device programmatically whenever required. May also use wake lock, but when screen off then actually @Override public void onMessageReceived(RemoteMessage message) { } This method not called so in this circumstances so how I can wake up the device? Can any buddy help me with this issue? 回答1: There are

Creating FCM Topics takes a long time to show in console

怎甘沉沦 提交于 2019-12-02 11:38:32
问题 When I subscribe to a topic which doesn't exist.. why would it take a day long to apear in the Firebase Console ? would be created directly or after 1 day ? (Can I access it even when it's not shown in the console ? ) I have an application that uses push notifications so I will create a topic for every user in case he has more that one device or token was deleted. is there a good way to achieve this rather than topics ? 回答1: The topic is immediately created when a device subscribes to it, or

Group Firebase FCM on Android Device

怎甘沉沦 提交于 2019-12-02 10:40:38
I am trying to send cloud messages using the Firebase console. I am doing this for android device. The push notifications do appear on the device fine along with the data sent with it. But each notification shows up on its own. Meaning if I send 3 notifications three items show up in the notification bar. What I want to achieve is that all the notifications to be grouped under one heading. As you have in WhatsApp or Facebook. How can this be achieved using the Firebase Console? By grouping the notification, do you mean stacking or bundling notifications ? If so, this is actually depends on how

Creating FCM Topics takes a long time to show in console

旧巷老猫 提交于 2019-12-02 03:50:00
When I subscribe to a topic which doesn't exist.. why would it take a day long to apear in the Firebase Console ? would be created directly or after 1 day ? (Can I access it even when it's not shown in the console ? ) I have an application that uses push notifications so I will create a topic for every user in case he has more that one device or token was deleted. is there a good way to achieve this rather than topics ? The topic is immediately created when a device subscribes to it, or a server app send data to it. But it indeed takes a few hours before tokens show up in the dropdown in the

Firebase Notifications - Invalid reg token, please check token format in Android

百般思念 提交于 2019-12-02 02:18:50
![enter image description here][1] If I send push message by selecting a package from Firebase console, the push goes to all devices, but during sending to individual device, it displays the error: Invalid reg token,please check token format Error Snapshot: [ ][1] eurosecom UserID in console is not the registration token for Firebase messaging. By Firebase docs : on initial startup of your app, the FCM SDK generates a registration token for the client app instance. If you want to target single devices or create device groups, you'll need to access this token by extending