Firebase not working with GCM server - android

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.

Related

Is it possible to send push notification through APNS to device token generated via FCM?

In the project , I am generating device token for both IOS and Android using FCM. And push notifications . In my research, I found push notifications can be sent with https://fcm.googleapis.com/fcm/send
But is it possible to send push notification to IOS device, By using APNS api.sandbox.push.apple.com to the token generated with FCM ?
Apple docs Link
No. Api.sandbox.push.apple.com can only be used with Tokens generated by Apple. You need to fetch the Apple token in the client using didRegisterForRemoteNotificationsWithDeviceToken and send it to your server.
BTW, the Firebase SDK does exactly that and fetches this token in order to send iOS notifications. For each FireBase token they fetch the relevant Apple token from the device and use it when connecting to the Apple servers.

FCM: Access all sent push messages

The goal I want to achieve for the app owner is to send FCM push notifications via web interface to the customers (already achieved) and to give the customers a view in my app, on which they can read all or at least the last 10 sent push messages. Is there any (REST) api in FCM which can be used to receive the sent push notifications and its content so I can display them in my Android fragment?
Unfortunately, there is no available API as of the moment to retrieve your GCM/FCM logs. However, there's been a recent improvement in the Firebase Notifications console where stats for messages sent using the FCM API is included in the Firebase Notification console stats.
The more details can be found from this answer and the blogpost.

Is there any work around to use Fcm device id with Gcm backend?

The problem is we have GCM integrated at the backend and when I try to add a new app to console it takes me to Firebase console when I click on google could messaging and when I send firebase device id to backend it is using GCM library to send notifications and gives mismatch sender id error. I know we have to implement FCM at the backend but is there any work around for sending notifications using GCM while using FCM device id from the backend?

Rpush notification not working for FCM enabled app

I have developed android app that allows FCM notifications. I am using rpush gem to send these push notifications, but I believe rpush sends GCM instead of FCM notification. I am trying to learn if there is a tweak to send FCM notification via rpush without changing android app to switch to GCM.
Try to check the push notification service for Ruby by github.
It was stated that FCM (used to be GCM) is one of the supported services.
Supported Services
Apple Push Notification Service
Including Safari Push Notifications.
Firebase Cloud Messaging (used to be Google Cloud Messaging)
Amazon Device Messaging
Windows Phone Push Notification Service
Based on Firebase Cloud Messaging
FCM and GCM are – as of writing – compatible with each other. See also
this comment for further references.

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

Categories

Resources