You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
The Intent supplied to startService(Intent), as given. This may be null if the service is being restarted after its process has gone away, and it had previously returned anything except START_STICKY_COMPATIBILITY.
I think it is safe to check whether intent is null.
But does it make sense to start a sticky intent service? Because if I
understand correctly, it cannot actually handle intents after restart
because of the Intent being null.
Yes, you're right. I was confused about the flags of Service.
I'm using IntentService as NOT_STICKY mode, but I reported NPE from Crashlytics.
the intent cannot be null, according to the document. Anyway I will reopen this issue after I get more information.
Thank you
I don't have more information, except that - according to my Crashlytics monitoring - this is happening from time to time in my app too. I'm using version 4.0.0 of AndroidAnnotations and only start the one IntentService using the builder methods provided by AndroidAnnotations.
Any ideas why the Intent could be occasionally null?
Activity
WonderCsabo commentedon Jul 20, 2015
simonz commentedon Jul 22, 2015
Yes, you're right. I was confused about the flags of
Service.I'm using IntentService as NOT_STICKY mode, but I reported NPE from Crashlytics.
the intent cannot be null, according to the document. Anyway I will reopen this issue after I get more information.
Thank you
chrulri commentedon Aug 14, 2016
I don't have more information, except that - according to my Crashlytics monitoring - this is happening from time to time in my app too. I'm using version 4.0.0 of AndroidAnnotations and only start the one IntentService using the builder methods provided by AndroidAnnotations.
Any ideas why the Intent could be occasionally null?
Ron-lab commentedon Jun 14, 2017
Same issue for me.
Any Solutions?
WonderCsabo commentedon Jun 14, 2017
@dodgex according to the JavaDoc, the
intentparameter can be indeednull. So we have to add an additional check here.dodgex commentedon Jun 14, 2017
PR is up. :)
WonderCsabo commentedon Jun 16, 2017
Finally fixed. Thanks @dodgex.