I tried to follow Microsoft Azure's guide to setup Push Notification with Android. But at step 4 I am stucked, as I can not find any places to enable the API for Push Notification, as the link leads to Firebase Cloud Messaging, which I can not use, since I need to provide my app for Windows too.
Azure requires GCM, but when I set it up using GCM, it fails with errorcode 401. What can I do?
... the link leads to Firebase Cloud Messaging, which I can not use, since
I need to provide my app for Windows too
Is Register your app for the Windows Store
section in Getting started with Notification Hubs for Windows Universal Platform Apps what you are looking for? If I understood you correctly, you were looking not for Xamarin-specific code, but for how to set up a hub to push to Windows devices. If it's not correct, please clarify in comments for this answer.
... the problem is, that Android is based upon GCM, and they now are using
FCM
Notification Hubs: how to Enable Firebase cloud messaging provides information about that.
I don't think, that Nikunji's answer helps. You are developing a cross platform app with xamarin. You should follow this guide, instead of Microsoft Azure's one, because the Azure Guide ist just for Android.
Good luck!
Edit: Based on the comments, I think you you should take a look at this and this.
Related
I am new to react native and I have built an app for magazines and catalogs which are loaded from my online hosting server (GoDaddy). I want to implement push notification in my app from that server on both android and IOS. Where should I begin and what are my options?
You can use services such as onesignal & fcm. Here i am sharing you some libaries for push notification
https://github.com/geektimecoil/react-native-onesignal (one signal)
You can use the below library for fcm, if you need any other firebase services such as authentication, dynamic links etc.. go for this
https://github.com/invertase/react-native-firebase (fcm)
If you just need only push notification services, you can use
https://github.com/evollu/react-native-fcm
I personally suggest you the last one, because i am using this in all of my apps and enjoying better experience with it..
note : all the above has support for both android and ios
this article will be helpfull for integration
https://medium.com/differential/how-to-setup-push-notifications-in-react-native-ios-android-30ea0131355e
Edited in 2020, last repo suggested personally is no longer maintained now. It's deprecated, as said on their repository. For future viewers, please prefer the second last package, i.e. react-native-firebase (fcm)
I know this seems like a basic question, but I can't find a clear answer to it. I want to develop an Android app with Xamarin to receive push notifications (new messages) from a Gmail account. I know the native Gmail app already does this, but for a few reasons I need to implement this funcionality myself. I searched about GCM, FCM, but I haven't found a single guide or example on how to do this. Please help!
I think the challenging bit here is the Gmail part.
For your scenario to work:
Gmail will need to forward its changes to a server-side application that you control
This server-side application will need to create a push notification by sending it to GCM/FCM's web services
From here you will need to implement push notifications normally in a Xamarin.Android app
I don't think you are going to find a prebuilt/off-shelf solution that achieves this.
This is a pretty tall order to implement yourself, but it seems to be quite possible. I will walk through what I would do to make this work:
Implement an Azure Function to act as a webhook for Gmail. Docs for Gmail here. I don't know if there is an example for this part.
Use Azure Notification Hubs to send push notifications. Your webhook will forward notifications to the hub. I have a sample here of sending from an Azure function.
Integrate the Azure Notification Hub SDK into your Xamarin.Android app
Like I said, this is quite a bit of work. I'm not sure if you have Windows Azure or Xamarin experience, but I think this is the easiest path forward for a new project using C#.
I have a book here (make sure you get 3rd edition) that covers push notifications and Azure functions in Xamarin apps. The sample code for the book is on Github if you want a free resource.
Take a look at Zappier, it integrates well with OneSignal which sends notification on top of Firebase. setup is easier than you can imagine.
I wanted to achieve a quite similar application to what you wanted to achieve. In my case, I wanted to develop a xamarin app that fetches a specific user's tweet and pop a notification to android client automatically.
Zappier provided easy integration between twitter and onesignal.
Onesignal automated the messaging.
Take a look at here for pre provided integrations:
https://documentation.onesignal.com/docs/zapier
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.
I have my Titanium Application for Android and now I want to implement Push Notification for Android in Titanium. I have my back-end service which get all notifications for me but I don't have knowledge about Google Cloud Messaging and what are the relation between them (i.e Push Notification and GCM). Please Provide me guidelines and way how to do it. Thanks in Advance!
Doing push notifications with Titanium is probably going to require a 3rd party service, most, if not all, are subscription fee based.
I've been looking to this myself for some planned future projects using either Titanium or Apache Cordova(Phone Gap).
The most popular recommendation I've been getting is Urban Airship It looks like they have some pretty nice features, but I haven't looked much further into it than that.
For Titanium, you can use this module (Open Source): https://github.com/liccowee/Google-Cloud-Messaging--Titanium-.
In examples, you see how to implement it in your app.
How can I send data from a server to an Android device without the device polling for data?
This is called a server side 'push' and is commonly referred to as 'pushing'. This is a well known feature of the iPhone, however, it does not currently exist on the Android. Android Cloud 2 Device messaging has not yet been released to the general development community. you may want to check out projects such as MQTT and Deacon.
You might consider using Googles cloud to device messaging for a solution.
You'll have to sign up for an account and are only able to use AppEngine servers at the moment.
Your application has to use API level 8 (2.2) in order to be able to receive the cloud's pushes.
GCM (Google Cloud Messaging) is the easiest way, and while GCM provides the basic service of sending messages, there are companies out there that do help you get up and running.
You could take a look at companies like urban airship, xtify and mBlox (developer.mblox.com) to get started with this and have a few additional tools that help you structure the push notifications in a more structured way.
Good Luck with your development!