Search code examples
androidpush-notificationandroid-c2dm

Android "hello world" pushnotification example


I am new to android application development and I am learning little bit. I am in a hard mission for sending push notification ( cloud messaging ) from my web server ( PHP ) to android application ( just a "helloworld" ). I did some "googling" and few of my doubts are

  1. Google is sending notification using our "device id" right ?
  2. Is there any code needed in our application other than adding some permission in out manifest for receiving notification ?
  3. We have to register user's device id to "local database" in order to send notification am I ?

Please help me Plus can any one please show me a code sample or documentation for sending a simple notification from PHP server ?

Thanks in advance


Solution

  • Firebase: https://firebase.google.com/docs/cloud-messaging/

    GCM(Deprecated): http://developer.android.com/google/gcm/index.html

    I don't have much knowledge about C2DM. Use GCM, it's very easy to implement and configure.