firebase-cloud-messaging

FCM push notification not received when app is killed/swiped out

前提是你 提交于 2021-01-28 11:08:43
问题 I am migrating notification to FCM from GCM. In GCM, I was able to receive notification when app was in foreground, background or killed, but in FCM, I am not able to receive notification when app is not opened/killed by swipe out. Am I missing anything???? AndroidManifest.xml <service android:name=".Services.ExtendedInstanceIDListenerService" android:exported="false"> <intent-filter> <action android:name="com.google.firebase.INSTANCE_ID_EVENT" /> </intent-filter> </service> <service android

Flutter FCM Navigation onResume/onLaunch

自古美人都是妖i 提交于 2021-01-28 10:55:18
问题 In my app, I got a class "home" where the user is navigated to after he is authorized. Within "home" there is a PageView with BottomNavigationBar. When the user is getting a push notification from firebase (new message) he should be navigated to ChatHome and to the specific chat after tapping. How can I do this? Home does look like this @override Widget build(BuildContext context) { return Scaffold( key: _scaffoldKey, body: PageView( children: <Widget>[ Feed(userID: widget.userID), SearchView

Can you expire / remove a message remotely on FCM?

落爺英雄遲暮 提交于 2021-01-28 08:35:51
问题 I'm using FCM for my push messages. Its great, however I've a client that needs to be able to remove a push message once its sent - (in case of mistakes / typos etc). I know you can get the message id from when the Topic is queued to send messages, just wondering if there is a way to then use that ID to expire those messages remotely. i.e. to delete the message. 回答1: There is currently no way to delete/remove a message from the server side/console. The message_id is just an identifier that

Set FCM channel ID in PHP for notifications

醉酒当歌 提交于 2021-01-28 07:42:57
问题 I'm trying to send FCM notification to Android device using PHP. My code is working for devices before Android O. In Android O, we need to set channel ID in request as well to receive notifications, which I cannot figure out how to do. I have done the necessary setup in the app and using Firebase Console I can receive a notification, but it fails when I try sending it through the PHP script. I also looked into the link below but it doesn't work for me. Android FCM define channel ID and send

open specific activity when e push notifications from firebase

巧了我就是萌 提交于 2021-01-28 07:07:51
问题 I have android application and tried to receive a push notifications. My problem when click the reserved notification open the main activity, I need when received push notifications from firebase open a specific activity directly. This is my code public class MyFirebaseMessagingService extends FirebaseMessagingService { @Override public void onMessageReceived(RemoteMessage remoteMessage) { super.onMessageReceived(remoteMessage); Log.d("msg", "onMessageReceived: " + remoteMessage.getData().get

FCM: Retry-after and exponential backoff

强颜欢笑 提交于 2021-01-28 07:04:21
问题 As I understand, when a message fails to be delivered, the Retry-After header is sometimes included in the response and sometimes not. But what happens if I first receives an error response with Retry-After included, resends the message and receives another error response but without Retry-After? I know I should use exponential backoff but how does that work when the previous waiting time was from the Retry-After header? Imagine this sequence of requests and responses: Request 1: No waiting

Android app doesn't show pop up notification sent from Cloud Functions

浪尽此生 提交于 2021-01-28 06:45:57
问题 I create an app chat with firebase realtime db, I'm doing add friend step, I want to show a notification when user click add friend. I used the firebase function. Everything works fine but my device still not show notification. I really don't know while. Can someone help me? My index.js to deploy on firebase: 'use strict' const functions = require('firebase-functions'); const admin = require('firebase-admin'); admin.initializeApp(functions.config().firebase); exports.sendNotification =

Firebase Cloud functions to Android application notifications

戏子无情 提交于 2021-01-28 06:27:26
问题 I need some hints for the following system: client app: Android backend: Firebase Cloud Funtions database: realtime database One of the scenarios is as follows: All users are on android devices. Users are sign-in via OAuth2 (google accounts). User1 creates an offer and the offer is 'waiting' in active offers list. Other users are notified for the change is active offers list.. User2 requests the offer and the offer is 'requested' Other users are notified for the change is active offers list..

FCM: Device receives only one of multiple notification messages

倾然丶 夕夏残阳落幕 提交于 2021-01-28 03:58:30
问题 I am currently writing an Android app using Flutter and a Node.js backend. On the client side, I followed the first 3 steps of the firebase_messaging docs to integrate FCM into my app. The logic of my app subscribes to und unsubscribes from several topics (one user is subscribed to 12 topics on average) based on different settings. The server logic is supposed to send various notification messages based on conditions: const firebase = require('firebase-admin') firebase.initializeApp({

FCM: Device receives only one of multiple notification messages

≯℡__Kan透↙ 提交于 2021-01-28 03:39:47
问题 I am currently writing an Android app using Flutter and a Node.js backend. On the client side, I followed the first 3 steps of the firebase_messaging docs to integrate FCM into my app. The logic of my app subscribes to und unsubscribes from several topics (one user is subscribed to 12 topics on average) based on different settings. The server logic is supposed to send various notification messages based on conditions: const firebase = require('firebase-admin') firebase.initializeApp({