please guide me how to implement the push notification in android. according to my application when server hits any information at any time i want to display that info at that time. what i need to implement this in my android plateform.
is it possible to enable push notification in 1.6
Amit Thaper
2010-08-09 05:32:17
There are other ways but C2DM is not available before 2.2
alopix
2010-08-09 05:53:30
Ok and thanks for your advice. Will you tell me how can i implement it in 1.5
Amit Thaper
2010-08-09 09:57:32
A:
As Alopix mentionned, the automatic way to do that is through Android Cloud, since Android 2.2.
Now If you want it before 2.2, here is what I choose to do to enable it in my application :
First, put a switch in your application, testing for the version of the Android system of the phone you are running on (with Build.VERSION and then the field SDK_INT).this way you know if you are in equal or above 2.2 or below.
Then, if you are below, you need to create a small php page, with for instance a timer, that will be executed regularly by your server, and you do a simple http request on this page to check if there are news available for your application.
Does that help?
Sephy
2010-08-21 08:55:44