-1

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.

skaffman
  • 390,936
  • 96
  • 800
  • 764
Amit Thaper
  • 23
  • 2
  • 6
  • Please go through this link- https://stackoverflow.com/questions/3606101/how-to-implement-the-push-notification-in-android/66075534#66075534 – Avnish Kumar Feb 06 '21 at 11:46
  • Please find the solution in https://stackoverflow.com/questions/3606101/how-to-implement-the-push-notification-in-android/66075534#66075534 – Avnish Kumar Feb 06 '21 at 11:47

2 Answers2

0

With Android 2.2 it is possible using the Cloud to Device Messaging.

dst
  • 1,651
  • 11
  • 26
0

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
  • 49,272
  • 30
  • 120
  • 129