1
Is there any way to kill another application (other than mine) via code without using a root command for it? I’m trying to use the command "am force-stop" but without success.
1
Is there any way to kill another application (other than mine) via code without using a root command for it? I’m trying to use the command "am force-stop" but without success.
0
You can only communicate with another application if it lets you.
Example: if you want to close Youtube, Youtube needs to let you do it.
I don’t know for sure what the command is but I recommend you read it here: http://developer.android.com/training/basics/intents/index.html
I can kill another application through root commands like "Kill -9 pid", but for that I need root access. I wanted an alternative to this, not to send a message to the other app
@Luizhenriquealegria I never researched, but probably not possible without root.
@Erickfilho possible should be, since it has apps that kill applications without root. Battery Doctor is an example.
@Luizhenriquealegria Verdade, have a look here: http://developer.android.com/reference/android/app/ActivityManager.html#killBackgroundProcesses(java.lang.String) will it help you? Try playing Youtube pakageName.
@Erickfilho almost got it with Activitymanager, but it hasn’t worked yet. This method only kills applications related to my application.
-1
You can use to destroy:
Finish();
Use this method to "kill" the root-less application.
I believe I was not very clear in my question. I wish to kill another application and not my own.
Then just implement the onDestroy method.
onDestroy? how could I for example kill the youtube application just with this method?
-1
@Override
public void onDestroy() {
super.onDestroy()
}
Could you explain your answer?
Browser other questions tagged android
You are not signed in. Login or sign up in order to post.
You just want to close the application or destroy it?
– Leonardo Rocha
I don’t want to kill my app, I want to kill others who are being executed.
– Luiz Henrique Alegria