GCM To FCM Migration For Push Notification Android - google-cloud-messaging

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.

Related

APNS handle obtained by Expo in React Native is incorrect

EXPO SDK Version: 42.0.01
Developing for: iOS
Our goal: successfully send a test notification from Test Send tool in Azure Notification Hub to a registered physical iPhone which is running a local instance of an EXPO app.
Progress: we're able to successfully register a physical iPhone with Azure Notification Hub without using a 3rd party library. We can see that registration in the Hub.
Issues: when using the Azure's Test Send tool we're getting an error "The Push Notification System handle for the registration is invalid" and the test notification does not get delivered.
Debugging:
we're using EXPO's Notifications.getDevicePushTokenAsync() API to obtain the push token.
Azure support team analysed the logs and concluded that the problem is the PNS handle i.e. Apple's ID of the phone registered for notifications.
the phone's PNS handle remains the same at all times.
by using "expo credentials:manager" I've added a new Push Notification Key using KeyID, TeamID and .p8 certificate - the PNS handle didn't change after doing that and notifications were failing too.
I haven't found any tools to validate the APNS handle. I'm currently awaiting a .p12 certificate from our corporate team to test notifications by using https://pushtry.com/.
How do we validate the APNS handle and if found that it's invalid - how do we cycle it / request another?
The PNS Handle from APNs does not change that often as it is tied to the device and app installation. See this answer for more details Does the APNS device token ever change, once created?

How can I make a react native application with push notifications and an API

I am building a new application in React Native and I built an API for the back-end.
I want to build in a push notification in the app when there is a new entry delivered by the API. I saw a framework that background fetches an API route and then shows a push notification but this only applies ones every 15 minutes. Other push notifications tutorials I see only work with a firebase database and I need it to work with my API.
Is somebody known with combining rest api's with push notifications in react native, that can help me?
Greetings,
Laurens
step 1:- first you need to add react-native-firebase, messaging in your react-native project for receiving push notification.
link to add react-native-firebase
step 2 :- check your application setup using firebase console's
Cloud Messaging service.
https://console.firebase.google.com/project/fir-demo-f375c/notification
if your application setup is perfect you will get push notification in device from firebase console's Cloud Messaging service.
step 3:- need to add server side code to fire push notification from server,
when your api hites to using server language like PHP.
for more detail in step 3 follow
https://firebase.google.com/docs/cloud-messaging/server#implementing-http-connection-server-protocol

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.

What could cause ti.cloud to stop display Android Push Notifications (GCM) in status bar

I previously setup an Appcelerator Titanium project with push notifications (as per my Stack Overflow question How to configure Android Push Notifications (GCM) in Appcelerator Titanium Dashboard?) and for some months my Android app has been receiving the appropriate push notification from GCM, but I'm now receiving reports that this no longer works from end-users.
The flow usually goes like this...
Android app sends android push token to my Java server
Java server persists the Android push token
Java server sets up Amazon Web Service SNS endpoint for GCM and stores this endpoint for later use.
(some time passes)
Java server invokes Amazon Web Service SNS endpoint with a GCM payload
Amazon SNS passes message to Google GCM
GCM passes message to ti.cloud / ti.cloudpush
Phone displays push notification
The app does receive the push notification and I display an application dialog to show the contents of the message, but NO system-tray push notification is displayed, whereas I thought it was doing this in the past. No system sound is played either.
I can see that if the app is not running, then when the push notification is received the app is launched, but if the display isn't on (or locked) then the message will not be discovered for some time. I really need the native/system push notification to be in the tray.
Does anyone know why system / status notifications are not displayed? Should it be when using the ti.cloud / ti.cloudpush for Android?
Thanks
Rob.

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.