dealing with received gcm push notification in different activities?

你离开我真会死。 提交于 2019-12-11 06:34:02

问题


I'm new to android development. I am able to push notification to devices. In my application, there are three different activities. I followed the google gcm client example to receive the notifications. Now i need to deal with the received push message differently according which activity is active. I understood that this can be solved with registering multiple receivers for push msgs. I dont know how to do that. Can you guys help me with this ? please/...


回答1:


Register different broadcast receivers in each activity. Then broadcast GCM messages from the GCMIntentService through Intent to these activities.



来源:https://stackoverflow.com/questions/15198458/dealing-with-received-gcm-push-notification-in-different-activities

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