Android: How to use Parse as an alternative GCM push notification provider?

后端 未结 1 2050
栀梦
栀梦 2021-01-03 13:47

SEE EDIT#2 at the end of the question (Google updated the way push is implemented so it became easier to handle gcm and parse together)

I already us

相关标签:
1条回答
  • 2021-01-03 14:39

    If I understand correctly, you want your code to handle all the incoming GCM messages, regardless of their source (which can be either your server or Parse website), which means you don't want the Parse code in your app do handle them.

    You can achieve this by declaring only a single broadcast receiver handling com.google.android.c2dm.intent.RECEIVE action in your manifest. That would be your GCMBroadcastReceiver class, which would handle all the arriving GCM messages.

    The behavior you are currently experiencing can happen when you declare two broadcast receivers that handle the same action.

    0 讨论(0)
提交回复
热议问题