push notification in android application

大兔子大兔子 提交于 2019-12-11 06:46:55

问题


Hi i wish to implement push notification in my own android application. how can i do? please give me some ideas....

This kind of broadcast receivers should receive messages even if my app is closed(like Gmail.here i receive one new message in my inbox means that time the notification message is displayed on top of my android device,clicked that notification message means directly go to inbox and view that message).

here i wish to insert one data on my database means the notification message is display on my android app even my app is closed.


回答1:


Please see http://developer.android.com/guide/google/gcm/index.html. You need to implement GCM.

EDIT:

To get notification even if app is in background, see Android GCM (push notification): device doesn't receive notification if application is stopped.

See Android GCM basic implementation, http://developer.android.com/guide/google/gcm/demo.html & How to setup Google Cloud Messaging for Android?




回答2:


see http://developer.android.com/guide/google/gcm/index.html for detaily. There you find a tutorial and all the basic stuff



来源:https://stackoverflow.com/questions/12595181/push-notification-in-android-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!