问题
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