firebase-notifications

Firebase Notification - send to user segment vs send to topic difference

邮差的信 提交于 2019-11-27 22:42:03
问题 I am assigned a task to use Firebase to implement push notifications but I am kind of new this. Looking at the documentation: https://firebase.google.com/docs/notifications/android/console-audience I can't tell under what circumstances should I use send to user segment or send to a topic . Can someone please give me some example when to use one or the other and point out the difference? Thanks ahead :) 回答1: Use User segements To typically send push notifications to a specific and limited set

Firebase notifications when app is closed

只愿长相守 提交于 2019-11-27 20:45:53
问题 I have implemented Firebase notification in my Android application. When my app is running, notification is displayed with my custom layout, but when application is not running, the notification is displayed with the default layout. How can I change the notification layout to my layout when application is not running. Also, I store shared preferences to let user toggle notifications. But when app is not running the notification is displayed anyways. How can achieve that? @Override public void

Firebase send push notification twice

China☆狼群 提交于 2019-11-27 17:50:24
问题 I wrote a very simple android app to test firebase push notification and I get one notification twice. this is the manifest service: <service android:name="com.google.firebase.messaging.FirebaseMessagingService"> <intent-filter> <action android:name="com.google.firebase.MESSAGING_EVENT"/> </intent-filter> </service> <service android:name="com.google.firebase.iid.FirebaseInstanceIdService"> <intent-filter> <action android:name="com.google.firebase.INSTANCE_ID_EVENT"/> </intent-filter> <

FCM - Setting badge in onMessageReceived

蹲街弑〆低调 提交于 2019-11-27 12:34:41
问题 I have an Android application, where I'm using some method to show notification number on app icon. Now I want to set that number when notification is received. I thought that I should set the number when notification received so I set it inside onMessageReceived method. But, my problem is when my app is in background, onMessageReceived method not called, so the notification number isn't set. Following is my code. I set the number inside onMessageReceived . I already tested setBadge method

APNS Firebase Notification failed to fetch token

会有一股神秘感。 提交于 2019-11-27 10:46:34
问题 For Swift3 / iOS10 see this link: ios10, Swift 3 and Firebase Push Notifications (FCM) I'm trying to use the Firebase for Notifications and I integrated it exactly as described in the docs. But I don't understand why is doesn't work. When I build my project I see this line: 2016-05-25 16:09:34.987: <FIRInstanceID/WARNING> Failed to fetch default token Error Domain=com.firebase.iid Code=0 "(null)" This my AppDelegate: func application(application: UIApplication, didFinishLaunchingWithOptions

Firebase Cloud Messaging (FCM) - Launch Activity when user clicks the notification with extras

时光毁灭记忆、已成空白 提交于 2019-11-27 10:36:05
问题 I'm trying to open a specific activity when the user clicks the notification, when the app is in the background, with some extra parameters. I'm using the click_action and it's working fine, the app opens the desired Activity. Now I need the server to pass an extra parameter, an id , to this Activity so I can present the desired details associated with the notification. Like an e-mail application, that when we click on the notification opens the details of that specif email. How can I do this

What is the difference between Firebase push-notifications and FCM messages?

守給你的承諾、 提交于 2019-11-27 10:10:28
问题 Heloo, I am building an app where I am using push notifications via Firebase Console. I want to know what is a difference between simply push-notification and cloud message? Is it that messages from cloud messaging are data messages(have key and value) and notifications are just text without key and value?Am I right? 回答1: Firebase API has two types of messages, they call them: notification data Explanation: notification - messages that goes directly to Android's Notification tray only if your

Firebase Cloud Messaging - Send message to all users

允我心安 提交于 2019-11-27 09:35:42
I'm new using the Firebase Cloud Message. I built an IOS app to receive push notifications. The app works fine. I send messages from the Firebase console and they're displayed correctly. Now I`m trying to build an web api to allow my customer to send the push messages (without accessing the firebase console). Studying the documentation here I realized that I've always to have a "to", meaning a group, topic or device id. My question is: can I send a message to all devices (like I can do in the console)? I yes, how so? Thanks in advance! AL. You can make use of topics. Given that all of your

How to send firebase notifications to audience via HTTP

落爺英雄遲暮 提交于 2019-11-27 08:30:13
In Firebase Console I set up audiences based on various user properties and now am able to send notifications to different user segments via console. Is there a way to do the same by http requests to fcm servers? There should be a trick with "to" field, but I couldn't figure it out. firebaser here There is currently no way to send a notification to a user segment programmatically. It can only be done from the Firebase Console as you've found. We're aware that allowing this through an API would expand the potential for Firebase Notifications a lot. So we're considering adding it to the API. But

Firebase chat Push Notifications

血红的双手。 提交于 2019-11-27 08:28:17
I am developing a chat app using Firebase as backend. It is required that on every new message receiver gets a push notification saying that he got a new message. This is first time I am doing something like this so I have a question: Since we do not use our own server for this, do we need a 3rd party provider (like Batch for example) for handling push notifications? If I am not mistaken I think Firebase does not support sending push notifications like this but only ones you send from console. Any help would be great. Hope someone finds this useful, it helped in my case. Currently sending push