Weird push message received on app start

后端 未结 6 1458
醉梦人生
醉梦人生 2020-12-08 00:28

I\'m getting a weird push message captured by my push service:

Bundle[{CMD=RST_FULL, from=google.com/iid, android.support.content.wakelockid=1}]
6条回答
  •  感动是毒
    2020-12-08 00:59

    For existing apps that extend a WakefulBroadcastReceiver, Google recommends migrating to GCMReceiver and GcmListenerService. To migrate:

    • In the app manifest, replace your GcmBroadcastReceiver with "com.google.android.gms.gcm.GcmReceiver", and replace the current service declaration that extends IntentService to the new GcmListenerService
    • Remove the BroadcastReceiver implementation from your client code
    • Refactor the current IntentService service implementation to use GcmListenerService For details, see the example manifest.

    it seems google split the GCMIntentService which extended IntentService to handle gcms to two services, one extends GcmListenerService that will handle received messages and other that filter iid.InstanceID separately to filter out that notification received for first installation, this is from new gcm android guides

    
        
            
        
    
    
        
            
        
    
    

    https://developers.google.com/cloud-messaging/android/client

提交回复
热议问题