Page 1 of 1

Kill signal

Posted: 15 Oct 2014 07:48
by Nerey
Hi
I'm trying to stop Navitel from my flow. I'm using action Kill App Process, but whatever signal I choose, on next launch Navitel says it crashed.
But when I rebooted device with Navitel running, it was stop correctly and there was no any errors on next Navitel launch.
I tried term, int, hup and kill.
Can you advice what signal to choose?
... or maybe there is any other way?

Re: Kill signal

Posted: 16 Oct 2014 19:28
by Martin
Hi,

Does it work when you use an action Execute Root Command: am force-stop com.navitel? You can use the [...]-button to select the command which allows to pick the package from an app list.

Regards,
Martin

Re: Kill signal

Posted: 17 Oct 2014 05:01
by Nerey
No, it works the same way :(

Re: Kill signal

Posted: 18 Oct 2014 10:01
by Martin
The app probably sets a flag when it is started and deletes the flag when the app is stopped using the regular exit/close button of the app. If this is the case, there's no way to kill the app without seeing this crash message.
You could try to use Control UI to automatically close the app (when screen is on and unlocked).

Re: Kill signal

Posted: 20 Oct 2014 05:01
by Nerey
But why when I turn off my phone Navitel ends correctly?

Re: Kill signal

Posted: 20 Oct 2014 16:25
by Martin
Hard to say what Navitel internally does exactly in this case but Navitel could listen for the shutdown event of the system and end Navitel properly.

Re: Kill signal

Posted: 21 Oct 2014 05:08
by Nerey
So can you tell me what signals are sent to Navitel when system shuts down and how to simulate it?

Re: Kill signal

Posted: 21 Oct 2014 16:10
by Martin
The system sends a broadcast android.intent.action.ACTION_SHUTDOWN but it's documented that only the system can send the broadcast.
Maybe Execute Root Command with command am broadcast -a android.intent.action.ACTION_SHUTDOWN works.

Re: Kill signal

Posted: 21 Oct 2014 16:29
by Nerey
Hmm... Sad
I thought I can send only to Navitel