Alex Dowining
Alex Dowining

Reputation: 970

push notifications on android

I have already implemented a push notification system for the android. My system works as following: From my server I communicate through the Http protocol with the google servers. Then the google servers are sending the notification to the mobiles. So, I was wondering if there are any alternatives ways to implement this functionality. However, I want something which will be reliable.

P.S. I would like to hear opinions from people that they implement something similar.

Upvotes: 1

Views: 544

Answers (2)

Jameo
Jameo

Reputation: 4607

I was working with some Chinese tablets that could not receive android push notifs (very annoying). I had to implement a Comet like system on android.

Basically, on the android device, I created a service which essentially polled a URL. But since polling is very battery intensive, I used a push technique called long-polling. I had the Android http client set a very long timeout. I then on the server side had the server hold the connection open also for a very long time. What would end up happening is that as soon as a message had to be passed, the connection would finish, and the android device would get the message immediately. This is just an additional method of "push" technology.

The only other option not discussed here is a persistant TCP/IP connection. This can be very dicey because Android could kill the service at will, and it can be somewhat battery intensive as well.

From my experience, GCM is the best method out there, and I wish there was something as good as it available for iOS Devices!

Upvotes: 1

Stefan de Bruijn
Stefan de Bruijn

Reputation: 6319

Not sure why you're looking for something else, if you've already got it working through the Google servers, but a good system to send push notifications easily is Urban Airship.

Upvotes: 1

Related Questions