Roadmap for Push Notification & C2MD using XMPP - android

i am planning to implement a push notification into android app , i saw so many threads related to that but i am focusing on using XMPP as i have ejabber installed already.
i came across the aSmack library but i am not aware how promising and stable that library is for
pubusb architecture as this model can provide push notifications.
what i want t know is
1) even the receiver who will receive the push notification has to be constantly connected with the ejabbered server ?
2) What should i do to get the advantage of C2MD as using XMPP and aSmack i dont think i will be able t
to get the benefits of C2MD
i have tried few libraries
1) xtify (paid)
2) urbanairship (paid)
3) Android Cloud to Device Messaging ( must require google account )
so i guess better to create your own using XMPP , can any one help me with the above questions

If you want to use a push system, you do not have to be constantly connected to ejabberd. If you prefer to handle the connection / reconnection in a battery optimized way yourself, then you do not need to implement push, as ejabberd serves as a channel for push.

Related

Which is best one among GCM and Sockets to create chat messenger in android studio

I have to create a chat messenger in android studio.There are a number of alternative available to create it but I am confused what to use?GCM(Google Cloud Messaging ) or Sockets .Please help me to find the best and efficient way to create instant chat Application in android studio.
Both GCM and Sockets have there pros and cons....
1.GCM is backed by google so you can expect a layer of seqcurity for you messages.
2.GCM doesn't guarentee that your message will be delivered.
3.GCM doesn't guarentee of the time it will deliver.
4.You need google play for GCM hence you need an alternative for Ios or other non android OS.
On the other hand.
1.Sockets can work on any OS as the communication is through channels created by sockets ..Hence no dependency of any third party app.
2.You can inclue TCP or FTP(if need to send files) or othe protocols.
3.More faster than GCM
4.Complex to implement both in client and server side
SO if I prefer a socket mechanism for a chat app

What to use Servers side events or Push notifications?

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.

Server Implementation for Push Notifications Sent Between Android and iPhone Devices

I would like to write an instant messaging mobile application with push notifications. One requirement is to have both an iPhone and Android version able to send push notifications between 2 devices regardless of the device type.
I am having trouble coming up with a best solution to send push notifications for the following 4 cases:
Android client -> server -> Android client.
Android client -> server -> iPhone client.
iPhone client -> server -> iPhone client.
iPhone client -> server -> Android client.
I have a few questions:
Did you find pushd simple to handle your push notifications? Did you run into any unforeseen issues?
What are the pros and cons between creating my own node.js server implementation and using pushd for the 4 cases above (minus learning more from doing it myself)?
Would it be simpler to use a different server implementation such as python or php through Apache?
Were there any resources you found to be critical to writing your own server implementation?
Is there a simpler suggestion for implementing push notifications between 2 cross-platform devices?
I've come across UrbanAirship and Pushwoosh but I don't think they apply to my use cases.
I apologize if this question seems to open-ended for SO but I have been struggling with this for the past few nights and am having a hard time coming up with these answers.
Thanks and I appreciate the help!
Check out Parse.com
Its amazing, and their push notification service is much simplier than creating your own.
Set up an endpoint, gated to a database for your push notifications and post to that service w henever necessary. For clientside code, see here for Android and here for iOS. If you'd like server code, leave a comment and I'll post an edit to this answer,

GAE Chat server for Android clients

I am looking for an optimal solution to implement chat server for android clients on GAE.
At the moment I use C2DM to notify particular users about new messages and pull data from server after such notification. But sometimes C2DM servers delay notification message and it stops to be realtime.
I also had a look on XMPP and it seems that it is mandatory to have an external XMPP server like google talk, so it is not what I am looking for too.
Is there another way to implement chat on GAE? Any advices are warmly appriceted!
The Reason why you are experiencing Delay with C2DM is because it is not real time. Google actually says this: It isnt the most reliable way. It suggest having a third party server such as XMPP
You can implement chat on App Engine using the Channel API, but the only supported clients for that are browsers. If you're prepared to make your Android app browser-based, that would be a solution - otherwise, you will have to look into third-party services, like Urban Airship.

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