FCM - Sending android push notifications by device tokens and environment/group - android

I would like to implement a method in which android push notifications through FCM are sent by both specific device tokens and an environment/group.
Just like there are two environments which needed to be implemented for sending iOS push notifications through APNS (sandbox & production), I would like to do the same using FCM.
Any suggestions?
Thanks in advance.

For setup FCM push notification just goto Firebase Console then add project and setup other settings for environments. Then goto cloud messaging tab and you will fine "server key" and "sender id". You need to share this with server side developer. From server side need to handle push notification for specific device tokens and an environment/group.

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.

send notification to ios and android using FCM Rest Api (New Versio)

I have a net core Back-End (3.1).
I created a page in which admin should enter title and description and pick a user to send a notification.
I want to send notification payload to Apple devices and not to an android device similar to a custom notification.
there is a platform-specific notification in Firebase Cloud Messaging documentation .
However, I was not able to implement it .
If you wanna only send the notification to Apple devices only. Then APNS Push notification push gateway will be suitable for you. See here
Certainly, FCM can also deal with this issue. You need to add the ApnsConfig to your request and send it to the FCM server.
If you cannot implement it, you need to mention more detail about your issue (trace log, exception info, etc.)

How to sent Automatic messages on button press from Firebase console using FCM?

I have been developing an application for both Android & iOS . I have worked with the Firebase notification and I am aware of notification using legacy server key but my main motive is to use only Firebase console for notification and replace my godaddy server so that I can be able to send notification on button click .
Question 1: Is there any Api or SDK available from firebase in which I can send notifications to mobile devices from another server(amazon or godaddy) ?
Question 2: Is there any way or method available from firebase in which I can send notifications to another mobile device having my app installed by tapping a button from one device(basically one to many approach)?
For sending push notification from your server refer FCM Application Server. Yes, you can send notification from one device to another by using Topics or Upstream Messages (Refer here : FCM Android

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.

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