Is there any other reason that the Intent passed to onStartCommand(Intent, int, int) should be NULL, except for restarting the system via a flag, for example START_STICKY ?
In addition, when the service is restarted by the system, the Intent.getAction() method returns NULL ... sometimes. Intent is not NULL only getAction()
I asked here , but have not received an answer yet.
UPDATE . After talking with Mark Murphy, he suggested that I return START_REDELIVER_INTENT in the onStartCommand() in my service instead of START_STICKY , so that all intent is sent after the restart,
I did not do this initially because I was worried that if the service is trying to do something, then in the middle of something restarted, will it be recognized that it started to do something? I think this is logic, I will have to answer for :)
android android-intent android-service
rf43 Dec 07 '11 at 19:38 2011-12-07 19:38
source share