Xamarin.Android push notifications GCM to Azure Notification Hub - android

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

Related

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.

Azure: Should a blank android app configure with azure library to send azure push notification or not?

I am new to azure and firstly i want to send push notification by azure portal, so i was reading this tutorial https://learn.microsoft.com/en-us/azure/notification-hubs/notification-hubs-android-push-notification-google-fcm-get-started
i have already a blank android app and i want to send push notification by that blank app so can i do it with that or i have to make a new blank app which should be configured with azure notification hub as described in above links point(Connect your app to the notification hub) after connecting with FCM ?
Please help me
It IS possible, but NOT recommended as your referenced documentation said as below.
This example of sending notifications from the client app is provided for learning purposes only. Since this will require the DefaultFullSharedAccessSignature to be present on the client app, it exposes your notification hub to the risk that a user may gain access to send unauthorized notifications to your clients.
If you are making your app for public purpose, bad user could get security key of push notification and could send spam messages. So, to address this issue, you need to create Azure WebApp to register and send push message.

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

Apple push notifications on GCM

I'm trying to create application for Android and iOS and, i want to use push notification on both the application. I'm going to have a server app that will be sending the notification.
but i am trying to APNS and Parse SDK it's common to use ,but i want GCM through push notifications on iOS ,can you please how can it possible ,any such information about GCM to iOS push notifications ,i am googling but i want some suggestions for GCM through iOS device notifications.Can you help me.thank you.
There is very good descriptive instructions in Google Cloud Messaging for iOS guide. It shows whole flow from registration of device token to receive push from server with code example.
After go through above guide, you may go for Setting up a GCM Client App on iOS and you are almost done to use GCM with iOS application
Update: GCM now supports IOS. See Grigo´s comment.
GCM is Android specific. If you want to avoid dealing with 2 different services for IOS and Android, you can use something like Amazon SNS for example. SNS now supports pushing cloud notifications to Android, IOS and Windows devices via the AWS Mobile SDK.

How to send push notifications

I need to add the ability to send push notifications out to users who have our app installed (yet to go to market).
I guess I will need to install a phonegap plugin that will look for updates on our server (or could be triggered from our server) but I'm struggling to find a good approach.
I have seen this:
https://github.com/saileshmittal/phonegap-system-notification-plugin/tree/master/android-statusbar-notificaion
It allows phonegap to send a notification, but I don't know how I could send a remote message to the script to trigger a message.
C2DM is deprecated and GCM ( Google Cloud Messaging) is used to implement your push notifications for Android App.
In Android the technology of push notifications is called C2DM. Here is a tutorial for this.

Categories

Resources