简体   繁体   中英

Android GCM automatic receives push notification

With new update document GCM on Android, I have followed this tutorial: https://developers.google.com/cloud-messaging/android/client . It works fine but I sometime I receive an automatic notification with log the bundle data on onMessageReceived(String from, Bundle data) , I got:

Bundle[{breaking_news_payload_extra=CoUGCgJlbhICdWsa+/OIgAwg2sLczueQgpI7Kg9UZWxlZ3JhcGguY28udWsyiwIaiQEigAFodHRwczovL2VuY3J5cHRlZC10Ym4zLmdzdGF0aWMuY29tL2ltYWdlcz9xPXRibjpBTmQ5R2NTbzdNV2IxYktrU0ZxRjEwN09LT2dKYVhmV0xVNVlZVFJ6YXZod2FwUGd3Qk5rMmZiRmxLaUxCWVU0a203d2w3VmlCYjNUZXJFUChkMGQ4AiJZIlFodHRwOi8vaS50ZWxlZ3JhcGguY28udWsvbXVsdGltZWRpYS9hcmNoaXZlLzAzNDQxL2RhdmlkLWNhbWVyb24tY29yYl8zNDQxNTY0Yi5qcGco7AQwgwMqIkFGUWpDTkVtNXlkSk9IdFRYWUhKWkZsd1hUbThJVUstQ3c4ovjkrwU=, collapse_key=do_not_collapse}]

My normal push bundle data is:

Bundle[{message=Message from MyApp, collapse_key=do_not_collapse}]

What is going on?

I still can't figure out the problem but my current solution is check the string from if it is equal my google project id. If from is not equal the google project id, do nothing.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM