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?
NullPointerException was often occurred in
@EIntentService.onHandleIntentThis is the generated
@EIntentServicecode,sometimes
intentgets null, sointent.getAction()makes NPE.And I could find the documentation from http://developer.android.com/reference/android/app/IntentService.html#onStartCommand(android.content.Intent,%20int,%20int)
I think it is safe to check whether
intentis null.