简体   繁体   中英

Requesting permission for your app to close another (Android)

I have been digging deep into the using ActivityManager's killBackgroundProcesses function to have my Android application kill another running application, however as it is widely know, an application with a different UID than your own cannot simply be killed.

After reviewing this documentation: https://developer.android.com/training/permissions/requesting.html

I have been interested to see if a user is prompted for permission, if another application (like Google Maps, Messages, Phone, etc.) can be killed by my application. Does anyone have insight on if this is possible?

According to the documentation, you can't kill other app because the operating system wont allow you to in any way. If you really want to do this, then you need to obtain root permission, by which the user has to root their phone and then provide the root access then only you can kill other application and overrule the operating system.

Mark Accepted if you are satisfied with answer.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM