Options to kill process/app?

Post your questions and help other users.

Moderator: Martin

Post Reply
Wibbly
Posts: 418
Joined: 17 Mar 2014 09:02

Options to kill process/app?

Post by Wibbly » 05 Sep 2016 13:55

I use the TomTom Speed cameras app and would like to be able to stop it programatically. I have tried the Kill App action (on my non-rooted phone) but the TomTom app will not respond to it (perhaps because it runs a notification it's classed as a forground app even when there's something else running 'in foreground'?). Either way, do I have any other options? Unfortunately I can't use Control UI as the phone may have it's lock screen active (albeit with no password due to it being in range of a trusted device) ...

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Options to kill process/app?

Post by Martin » 05 Sep 2016 19:58

That's difficult on a non-rooted phone. You probably have to turn on the screen (action Turn Screen On) and unlock the screen (action Dismiss Slide to Unlock Keyguard works on some devices).

You could then start to use action Control UI and simulate a few back keys with back(); or launch system settings->Apps->TomTom and click("FORCE STOP");. You can directly launch the app-info page with action Start Activity and example Launch app-info page.

Wibbly
Posts: 418
Joined: 17 Mar 2014 09:02

Re: Options to kill process/app?

Post by Wibbly » 06 Sep 2016 07:31

Thanks Martin.

I have since realised there's an action I can perform on the app's status bar notification to close the app :-) And it seems to work even with the phone still keyguard-locked, which is good! Fortunately with my use case, I can get away with closing the app as soon as the notification is posted (using that as the trigger with a condition following).

Thanks for your quick response anyway

Post Reply