Create push notification in android

前端 未结 2 1663
轻奢々
轻奢々 2020-12-17 07:15

how to create push notification in Android using GCM or either C2DM i have tried and check some sites and didn\'t get exact answer.i need to know how it works.Can any one pr

2条回答
  •  Happy的楠姐
    2020-12-17 07:40

    Its Depend on your requirement what you have to do.

    here is sample of C2DM: in this sample android device is registered wtih server after that server send massage to all device. so there is one way communication(server to Android device)

    enter image description here

    So all things are done at server side. just download this tutorial. Both Server side(PHP) and Android code are available.

    Edited:

    you got application key from Google services which you have to put at server side.

    SENDER_ID – Google project id which you have to send when you want to register your device with server.

提交回复
热议问题