Skip to content Skip to sidebar Skip to footer

Unable To Start Service [service Name] With Null

i recently coded a Android Widget and tested it on Emulator as well as my Galaxy S , it worked fine on both, after i posted the same to android market now i am getting some error r

Solution 1:

According to the documentation for onStart() (actually onStartCommand() but the parameters are the same):

intent 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.

Solution 2:

Hi just to add on to this, so the workaround is just to add a if(intent!=null) before the getAction()? If I do this, will the service start up properly later on it's own? Meaning the OS actually helps me start the service properly in the case of a null intent. I'm afraid of ending up in a situation where the service doesn't get started at all.

Post a Comment for "Unable To Start Service [service Name] With Null"