I wanna develope Push notification without C2DM. Then I googled and found out some ways to impelements Push notification.
- Polling – not a good solution
- SMS – costly solution
- Persistent Connection – acceptable solution
I know that many programmers implements push service using persistent connection, but I think it also costs too much. So I have a idea to implement push service by client-side ServerSocket. Is there any problem here? (e.g. Security or battery prob etc.)
Updating IP address to server whenever client’s network changes, when events occur, server establishes connection to android client.
Any comments will be appreciated!
There are some disadvantages using TCP/IP (Socket) implementations.It is difficult to implement reliable service
because when the memory in android client becomes low, Android OS will kill the service.So this can happen when your
phone in sleep mode or any other situations.
But you can still achieve server side push to android via AndroidPushNotificationsDemo.There is a framework called mqtt. This framework has been
put in https://github.com/tokudu/AndroidPushNotificationsDemo and you will get more information when you go through this\
link:
http://tokudu.com/2010/how-to-implement-push-notifications-for-android/
There is a similar posts about this on the following stackoverflow thread.
Push Notifications in Android Platform