Kill signal

Post your questions and help other users.

Moderator: Martin

Post Reply
User avatar
Nerey
Posts: 102
Joined: 07 Mar 2014 16:59

Kill signal

Post by Nerey » 15 Oct 2014 07:48

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?
Sorry for bad english, my native is russian.

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

Re: Kill signal

Post by Martin » 16 Oct 2014 19:28

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

User avatar
Nerey
Posts: 102
Joined: 07 Mar 2014 16:59

Re: Kill signal

Post by Nerey » 17 Oct 2014 05:01

No, it works the same way :(
Sorry for bad english, my native is russian.

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

Re: Kill signal

Post by Martin » 18 Oct 2014 10:01

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

User avatar
Nerey
Posts: 102
Joined: 07 Mar 2014 16:59

Re: Kill signal

Post by Nerey » 20 Oct 2014 05:01

But why when I turn off my phone Navitel ends correctly?
Sorry for bad english, my native is russian.

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

Re: Kill signal

Post by Martin » 20 Oct 2014 16:25

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.

User avatar
Nerey
Posts: 102
Joined: 07 Mar 2014 16:59

Re: Kill signal

Post by Nerey » 21 Oct 2014 05:08

So can you tell me what signals are sent to Navitel when system shuts down and how to simulate it?
Sorry for bad english, my native is russian.

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

Re: Kill signal

Post by Martin » 21 Oct 2014 16:10

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.

User avatar
Nerey
Posts: 102
Joined: 07 Mar 2014 16:59

Re: Kill signal

Post by Nerey » 21 Oct 2014 16:29

Hmm... Sad
I thought I can send only to Navitel
Sorry for bad english, my native is russian.

Post Reply