Rpush notification not working for FCM enabled app - android

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.

Related

SNS Mobile push notifications extremely confused

Right now I'm trying to send mobile push notifications to my phone when someone publishes a message to SNS. I'm confused about what services I have to use. Do I have to use a 3rd party service like Firebase Cloud Messaging/GCM to send mobile push notifications? Or can I send it directly from SNS to my phone.
In AWS docs it's a bit contradicting to me.
https://docs.aws.amazon.com/sns/latest/dg/sns-mobile-application-as-subscriber.html
It says:
To begin using Amazon SNS mobile push notifications, you need
the following:
A set of credentials for connecting to one of the supported push
notification services: ADM, APNS, Baidu, FCM, MPNS, or WNS.
A mobile app that is registered and configured to use one of the
supported push notification services.
So that means we have to use a third party service right? But however in one of the AWS SNS tutorials:
https://docs.aws.amazon.com/sns/latest/dg/mobile-platform-endpoint.html
it says we can create a platform endpoint for my mobile device so that it can recieve push notifications. I am extremely confused, do we have to use a third party service or can we send SNS push notifications directly to our phone?
I checked stackoverflow and the answers are not clear to me either
Can Amazon SNS push notifications directly to mobile devices?
Amazon SNS Sending direct push notification to individual device
Can someone please clarify this for me?
AWS SNS manages and abstracts different push notification services.
For AWS SNS to be able to make use of the appropriate push notification service, it would need a platform endpoint. It would need to know which platform (i.e iOS) an app is built.
it says we can create a platform endpoint for my mobile device
To create a platform endpoint, you would need a certificate coming from the Push Notification provider.
Example: .p12 is a certificate from Apple which will require "Push Notification" feature to be enabled.
Once a platform application is created, the app would need to register a unique device token to AWS SNS.
This device token is generated by iOS or Android to uniquely identify the device. The app can only generate the device token if it's properly signed by a certificate from the Push Notification provider.
do we have to use a third party service
Yes you need a third party service to:
generate the certificate with push notification feature enabled
generate the device token associated with your physical device
properly sign the app using the certificate
or can we send SNS push notifications directly to our phone?
AWS SNS manages this for you by matching device endpoints to the correct device token. Then invoking the appropriate push notification service. (i.e APNS, GCM).

Is it mandatory to use GCM service to show push notification?

I am developing a Cordova app having a Java backend. I want to know if it's mandatory to use GCM service in order to show a push notification in Android/iOS (in notification tray)?
I am using Apache Kafka, MQTT brokers in my backend. Is it possible to show push notification using these solutions, i.e. using completely self defined solutions?
Using MQTT & other brokers I am able to send realtime data to users but how to show those message as native notification in notification bar is my problem.
Yes, you will need to use GCM to send push notifications to Android devices. You can even use GCM to send push notifications to iOS devices (GCM makes request to APNS (Apple push notification service) to make it work).
But GCM for iOS isnt trusted much.
You can use any backend to send push notification to your devices. You just need to make a request to GCM/APNS.
This is the cordova plugin for push notification.
Integrating with GCM is damn easy, but it takes a little effort with APNS.
Most people use third party paid services like Pushwoosh to implement their push backend because its convenient. There is a free alternative OneSignal but it tracks your usage.
Follow this guide to setup push for APNS. (You can just use the Setup certificate part from this guide, since you are not using C#)
To receive push you need use/implement GCM(and actually FCM, because of GCM deprecation)
To show notification from app it is unnecessary to implement GCM/FCM

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.

Is there any specific reason to use Amazon SNS instead of direct Baidu service

I have created push notification using Baidu. It works well through Baidu console and I receives the notification in my Android mobile.
I have to create a webservice to send push message from my specific application by using the SDK provided by Baidu. I have another option which seems to be available under Amazon SNS. It seems like a wrapper to Baidu, GCM etc.
My doubt is is there any specific advantage for using Amazon SNS over the Baidu provided SDK?
tldr;
If you target the chinese market only and Baidu is working well for you and you have all you code setup to work with Baidu, then stay with Baidu
Some other points to clarify about Amazon SNS
Baidu cloud push offers a really good service if you want to send notification on the chinese market
Amazon SNS on the other side is a much larger offering and as part of the Mobile Push Notifications Amazon will act as an abstract layer and you can choose which implementation you want.
It has the following advantages:
You are not limited to Baidu scope so you can send notification on the chinese market but not only and if/when needed to send a notification abroad it will be much easier without rewriting the whole thing
You can use the same code and change quickly the provider for push notification in case the provider does not work at a given time (downtime operations) or if the conditions change and you're not happy with new conditions.
You send push notification messages to both mobile devices and
desktops using one of the following supported push notification
services:
Amazon Device Messaging (ADM)
Apple Push Notification Service (APNS) for both iOS and Mac OS X
Baidu Cloud Push (Baidu)
Google Cloud Messaging for Android (GCM)
Microsoft Push Notification Service for Windows Phone (MPNS)
Windows Push Notification Services (WNS)
The following figure shows an overview of how Amazon SNS is used to
send a direct push notification message to a mobile endpoint.

Xamarin.Android push notifications GCM to Azure Notification Hub

I have a Xamarin.Android application that I've configured for GCM using this Xamarin guide
The app is able to receive the notifications this way.
BUT, when I put the GCM API key in notification Hub, and send the notification via Azure, its not received in the app.
The app registers with GCM. Do I need to register with Azure Notification Hub? If yes, how?
Found the solution. I had to register with Azure notification hub too.
If someone is stuck, follow this:
https://azure.microsoft.com/en-us/documentation/articles/partner-xamarin-notification-hubs-android-get-started/
Or, follow the example given in Xamarin's "Azure Messaging" component here:
https://components.xamarin.com/gettingstarted/azure-messaging

Categories

Resources