Firebase Notifications Events with FCM - android

there are some events that are logged on Firebase Analytics when you send an notification through the Firebase Notifications on Console (notification_receive, notification_dismiss, notification_foreground, notification_open).
I would like to know if it is possible to log those same events sending the Push Notification through the API (Firebase Cloud Messaging - FCM).

Related

FCM notification unsubscribe

I have implemented Firebase cloud messaging in my app for push notifications. Everything working fine. But notifications are getting even user logged out from app. If user uninstalled the app directly then how can i unsubscribe the topic notification. if i have subscribe the a topic and now i unsubscribe the topic and subscribe the new topic then i also receiving notification for old subscribe topic also.
When you uninstall the app, the service handling the FCM messages and notifications will also be removed from the device. So you won't be receiving any push notifications once you uninstall.
if your are subscribing to fcm topic then there is way to unsubscribe from that topic to not recieve any notifications for that topic.
below is the method you need :
unsubscribeFromTopic (String topic)
check google firebase docs here :
https://firebase.google.com/docs/reference/android/com/google/firebase/messaging/FirebaseMessaging

Is it possible to send automatically push notification to android app by using Google Analytics for Firebase Triggers on "app_remove" event

I am trying to send a push notification when user is going to uninstall my Android app. My idea is to use Firebase Cloud Messaging and Google Analytics for Firebase Triggers. In order to be able to use triggers I have been marked "app_remove" event as conversion in Firebase Console of my app. It is possible send notifications using Firebase Cloud Messaging triggered by a Firebase function as described in this question, but when my app is uninstalled It will not be able to show incoming message from FCM as a push notification. It is possible to setup the incoming message to be displayed as push notification even my app is uninstalled?
It is possible to setup the incoming message to be displayed as push notification even my app is uninstalled?
Not possible.
When your app is uninstalled, the corresponding registration token tied to that specific app instance is also invalidated.
The registration token is what FCM uses to send messages to the corresponding device, if invalidated, FCM will no longer have any way to send messages to that device.

send notification from firebase console to old users with gcm tokens?

I have questions about migrating from gcm to fcm.
we are going to migrate from gcm to fcm. we have lots of users with gcm tokens and we have already sent them push notifications from onesignal panel. now when we migrate to fcm,what happens to old users with gcm tokens? I know if we force our users to update their android version to new version(the one with fcm) the new fcm token will be generated for users. but what if we don't want to force our users to update? Is it possible to send notification from firebase console to old users that have gcm tokens?
I have already done the migration procedure according to this link:
https://developers.google.com/cloud-messaging/android/android-migrate-fcm
I tried same but gcm people is not getting notification so i make 2 payload 1 for fcm and 1 for gcm and sending massage for both fcm and gcm at same time so i m getting gcm notification but you have to handle crash for gcm notification in fire-base app. means it will crash when you receive gcm notification on fcm but when fcm notification come it will diaplay

Sending notification to GCM registrations using FCM console

I tried sending notifications to GCM user using FCM console. But the notification delivered twice.
Is it possible to send notification to GCM registrations using FCM console.
Is there any way?

Firebase not working with GCM server

t-0: Someone has a server X that uses GCM to send notifications on certain events
t-1: I build my android app against server X and implement GCM. And it works great.
t-2: Firebase has a nice feature that lets you send notification from a console (similar to how Facebook's Parse used to work)
t-3: I change from GCM to FCM.
t-4: My android app can no longer receive notifications from server X
Now Firebase claims, and I quote
Updating these endpoints is not strictly required, as Google will
continue to support the existing GCM endpoints.
For the skeptics: I am working on two different git branches fcm and gcm. When I am on branch gcm notification works; but on fcm I cannot get notification from server X (but it works from the Console, yay!)
You'll have to continue using the old method you were using to send push notifications to GCM users and for the users who registers through FCM will only be able to receive push notifications through FCM or Firebase Notification console.
You can't send push notification to GCM registration tokens through FCM.

Categories

Resources