What to use Servers side events or Push notifications? - android

We are developing step by step game and need to send a notification to all players of current game when someone made his turn. We have a REST server that uses jersey + jackson implementation.
We know that it is possible to use Google Cloud Messaging for this purpose, however it doesn't support windows phone platform (we want to support Android, iOS, Windows Phone). Yes, Microsoft has their own server, but it requires to learn API of 2 services. Also, we found that server sent events protocol exists that can help us.
Is it good idea to use SSE (on all mobile platforms) instead of push notifications or there are some better solutions?
Thanks.

Using SSE is a bad usage for your requirement, as it will only work when your app is running, no notifications will be received when your app is closed.
You should use the notification system of each plateform you target (GMC for Andorid, Apple Push Service for ios, etc.)
Each device needs to register to the notification server and then you can send notifications to registered devices.
Since your targetting multiple plateforms, it would be easier to use a third party service that will do the registering and message dispatching to all your targetted plateforms through a simple API.
As suggested by Rahul Mathur, Parse is a known and reliable provider. Other possibilities include AWS SNS, Urban Airship, PushWoosh, and a lot more !

I suggest you to use parse as it is easy to implement
For android : https://parse.com/tutorials/android-push-notifications
For iOS : https://parse.com/tutorials/ios-push-notifications
You can also customise your php script on parse console.

Related

Can I Use Application Web Services Which is Already Made for Android in iOS especially in push notification

Is their any difference between web services for android and iOS ?? especially if i am implementing push notification using google cloud messaging
Thank you in advance
Web services
There shouldn't be any major differences between web services for Android and iOS. Especially when it comes to exchanging JSON with object representations. At the end, it's all the same, parsing and mapping. Sometimes you might want to return some special, platform specific information. In this case, the mobile clients need a way to tell your backend which OS they're running.
Push notifications
Push notifications is a different story. On Android you have Google Cloud Messaging and on iOS Apple Push Notification Service. Your back end has to know which notification service to use.
There are many ways to solve this problem.
One way is to set a custom HTTP header that would contain information about the OS the mobile client runs. Another is to have a parameter that is sent with each request.

Is there an alternative to Push Notifications using native platforms (GCM, APNS...)?

I am reading about alternatives to push notifications on mobile phones using Google platforms (GCM) and Apple platform (APNS), but I've found a lot of gateways which simplify the interface for the developers but afterall also use GCM, APNS, WMS....
I'd like a true alternative for delivering messages on mobiles and after the message is received, I wish to generate a internal Push over OS (not over a Cloud Platform).
I've read about MQTT to implement this lighweight communication. Is there another option or have you experienced using MQTT for this purpose?
Thanks.
You can go services like Parse Pushnotification or UrbanAirship. They basically work on GCM For Android(support ios too but i am not sure on the details). These have very user-friendly interfaces and easy to implement in aps.

Right way to establish push notifications for Android/iOS

Assuming my application is based on HTML5/Jquery mobile (Cross platform web app),
How is it possible to create push notifications for Android/iOS ?
Also, does it include developing different "notifications engine" for
each device? (in other words: Do I need to implement two different background processes for each type of device?)
I'd be really glad to get a full answer/references to my conflict.
I have searched for the forum's previous answers but it seems like the threads are quite old so i preferred opening my own question.
GCM is the Google Cloud Messaging Service for Android, while APNS is the push notification service for iOS, both of them are very similar.
If you're already using html5 and jQuery, I would suggest you to use Phonegap which is a framework that allows you to create mobile apps using only html5 css3 javascript(jQuery) it was very useful for me and they've a push notifications plugin which works for Android and iOS.
Be sure to check Phonegap and Phonegap Build (which is a very interesting service)
Regards
1)
Apple has Apple Push Notification Service (APNS) to push out alerts.
More details at
https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html.
Google offers a comparable Google Cloud Messaging Service (GCM).
Details at http://developer.android.com/google/gcm/index.html. UPDATE: GCM does support iOS as a client, so can be used for both Android and iOS, with some work. (Technically, it will be an APNS when it reaches the iOS device.)
2) Not sure I understand what you mean by "background processes", If you are referring to backend service/originator of notifications,then the service needs to be able to communicate i with both the Apple APNS or Google CDM using the interfaces supported by these services and send out alerts in appropriate format. If you are looking for a third party service for sending out push notifications, you can checkout UrbanAirship or Parse which can send notifications to either platform.

iOS Android and windows Push notification

I have an application for for iOS, Android and Windows mobile.I want to send notifications to the application. AFAIK as someone new to this, I think that I need to send the notifications from my server to GCM server for Android and APNS for iphone, I have no idea for windows.
I was hoping if I can send the notifications directly to the phone (setting up a XMPP server , what the IM messenger usually use (JABBER,EJABBERD etc.)) without going to APNS of GCM .
EDIT : The application is an enterprise application so some customers don't want to share aur route their data across GCM or APNS servers.
Is that possible, please guide me to the same .
Thanks.
Take a look at https://github.com/Redth/PushSharp, It's a pushnotification service library for Windows, IOS and Android
Push notifications for Windows Phone: http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff402558(v=vs.105).aspx
Or you can use a service like Parse.com that allows you to manage push notifications for all he platforms using one API.
The library does that for you, you first need to do some configuration Check here.
Look a the samples.

Android:How to send data from server to android with no request from the android?

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!

Categories

Resources