处理在不同的活动获得了GCM推送通知?获得了、不同、通知、GCM

2023-09-12 05:42:06 作者:辣条总统

我是新来的android的发展。我能推通知设备。在我的应用程序,有三种不同的活动。我跟着谷歌GCM客户端的例子来接收通知。现在我需要处理接收到推送消息,根据不同的活动而被激活。我明白,这可以通过注册多个接收器推封邮件来解决。我不知道该怎么做。你们可以帮我吗?请/...

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/...

推荐答案

寄存器中的每个活动不同的广播接收机。然后,从广播GCM消息 GCMIntentService 意图这些活动。

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