Page 1 of 1

Start service intent conversion post 5.0

Posted: 17 Nov 2015 13:13
by channel
Hi, I used the action "Start service" with a specific intent to close an app
com.acmeandroid.listen.action.EXIT
I used it on a old terminal with android pre 5.0 without problem.
Now, tring on a new one with android 5.x (I tried on a S4 and on a G4) I got an error "Service Intent must be explicit"
I've read on various forums that the API has been changed by google and I sould instead use as action something line "android.intent.action.SEND" with some parameters.
My question, after some hours of trying is: could someone poit me in the right direction to convert the old call into the new API format?

Thanks to all

G.

Re: Start service intent conversion post 5.0

Posted: 18 Nov 2015 19:21
by Martin
Hi,

If you are still targetting the same app, the same intent might still work. You just have to check Explicit Component and select the package of the target app.

Regards,
Martin

Re: Start service intent conversion post 5.0

Posted: 19 Nov 2015 13:28
by channel
Absolutely right!
It works. Thanks a lot