GCM migration to FCM - google-cloud-messaging

I am confused about GCM to FCM migration.
I was sending data only, so I could wake up my app when it was closed, and got into onmessagereceive.
With my migration to FCM, it no longer works, and saw following :
A service extending GcmListenerService is now required only for the following use cases:
receiving messages with data payload only.
WHat exactly needs to be maintained from the GCM part. Do I need to have both FCM and GCM in my manifest, and do I need to have both FCMlistenerservice AND GCMlistenerservice ?
If only GCMlistenerservice is required, what is then the use of the FCM migration , and why is this data payload only not integrated in the FCM ?
Thanks in advance
Best regards
Ludo Kustermans

Related

GCM To FCM Migration For Push Notification Android

I am Migrating From GCM to FCM FOR SENDING Push notification to my some Android application of my Organization.
I have changed the GCM End Point to FCM End Point at Server Level.
I want to know Two Things related to this Migration -
1) when gcm api will depreciated after 11 april , 2019, Do i need to change my existing Project From Google Console to FCM Console or There is no need to change existing project from Google Console.
2)Do we need to change any code at application level (Client Side) for getting Push notification because we have used FCM End Point URL in place of GCM Url (Keeping rest of code logic same) at server end .
Please suggest.

Is there dry_run functionality in FCM?

GCM has dry_run functionality:
This parameter, when set to true, allows developers to test a request
without actually sending a message.
GCM is being deprecated in favor of FCM, but I don't see a similar feature in FCM.
Does FCM allow you to do a dry run?
AL's answer is based on the FCM Legacy.
For FCM v1, this option is called validate_only
You can see the documentation here: Firebase docs
Yes. The dry_run feature is still available for FCM (Legacy).

How to get local-notification without Apns for ios in react-native?

I searched some notification library for react-native.
https://github.com/zo0r/react-native-push-notification
This works well for Android but it requires Apns for ios
I would like to find some libraries that doen not require Apns and simple.
There is no avoiding using APNS for remote push notifications.
In order to receive data in certain scenarios, such as having your app running in the background, phone being offline and later receiving a notification once it is back online, your device must have a unique app-specific device token generated by Apple. You can then use a service such as FCM or AWS SNS to deliver the notification to clients.
Also, for Android, you will need to use GCM to generate the device token.
You can, for testing purposes, you can use react-native-push-notifications' PushNotification.localNotificationSchedule to create a dummy local notification.
Here is a good tutorial for setting up remote push notifications with APNS and FCM: https://www.appcoda.com/firebase-push-notifications/.

PushSharp - GCM Authorization Failed

Using v4.0.10 of Pushsharp (nuget package), I am getting error GCM Authorization Failed when sending push notifications to Android devices.
Seems the bug raised in issue 574 (https://github.com/Redth/PushSharp/issues/574 ) has been compiled into the nuget package, yet I'm still getting this error.
Could this be related to the introduction of Firebase Cloud Messaging?
Does anyone still have success using GCM?
As of right now, GCM is still usable. However, it is highly encouraged for new users to use FCM instead. Either way, for both GCM and FCM, you must use a Server Key generated from the Firebase Console. There is a visible note in the GCM docs saying:
Starting from Sept. 2016 new server key can only be created in the Firebase Console using the Cloud Messaging tab of the Settings panel. Existing projects that need to create a new server key can be imported in the Firebase console without affecting their existing configuration.
The Authorization error has been encountered by number of users, some also had an old project. See my answer here for more details.
The sender id used in the app code needs to match the sender id Firebase Cloud Message Console and its corresponding "Firebase Cloud Messaging token".
Thank you #AL for your help.

Gcm with appodeal

I am using gcm with appodeal in my app and when I am sending the push notification the for the first push was successful but phone is not receiving the notification and after that error is there while sending push that device is not register. What to do in this situation please help me.
Is it iOS or Android ? I had the exact same issue just yesterday with iOS and all I had to was to create a development provisioning profile and set it up properly in xCode. I hope that helps you.
I think for you to verify that your app can send and receive messages, client apps must register with GCM.
To register with GCM:
1.The client app obtains a registration token using the Instance ID API. The call to this API must have the authorized entity set to your app server's sender ID, and the scope set to the appropriate value for GCM (depending on your platform). Refer to the API reference for full detail on this API.
2.The client app passes the registration token to the app server.
3. The app server saves the registration token and acknowledges to the client app that the process completed successfully.
This thread may also provide further insight as to why you are receiving the device not registered error.