I am using GcmNetworkManager in my application for periodic and one of task task execution. I am getting these 2 errors and unable to figure out the reason. Implementation is correct as i am unable to reproduce these issue on staging.
Fatal Exception: java.lang.RuntimeException: Package manager has died
at android.app.ApplicationPackageManager.queryIntentServicesAsUser(ApplicationPackageManager.java:700)
at android.app.ApplicationPackageManager.queryIntentServices(ApplicationPackageManager.java:706)
at com.google.android.gms.gcm.GcmNetworkManager.zzdi(Unknown Source)
at com.google.android.gms.gcm.GcmNetworkManager.schedule(Unknown Source)
&
Caused by java.lang.IllegalArgumentException: There is no GcmTaskService component registered within this package. Have you extended GcmTaskService correctly?
at com.google.android.gms.common.internal.zzx.zzb(Unknown Source)
at com.google.android.gms.gcm.GcmNetworkManager.zzdi(Unknown Source)
at com.google.android.gms.gcm.GcmNetworkManager.schedule(Unknown Source)
Any help will be appreciated.
Thanks
P.S: Devices has play-service 8.1+.
I ran across the same issue. I have found a fix, but I'm not sure about the reason why. In your
AndroidManifest.xml
don't forget to setenabled = true
I know this a little weird, but like I said, it started working and now, the periodic task is also running successfully.here,
PeriodicTaskService
obviously, extendsGcmTaskService
.