Is it possible to disable apps without hiding them?

女生的网名这么多〃 提交于 2019-12-10 21:01:21

问题


Background

End users can disable certain apps via the App manager which is built into the OS. This screen looks something like that (on some devices it says "Turn off" instead):

Once you disable an app, it will not be active and won't run in any way till you re-enable it again. However, in order to re-enable it, you can still find it on the app-manager, as shown here.

I'm trying to mimic this behavior on my "App Manager" app.

What I tried

Using the ADB tool (or using root and then the ADB tool), you can use the next command to disable apps:

adb shell pm disable APP_PACKAGE_NAME

where "APP_PACKAGE_NAME" is the package name of the app to disable.

The problem

If you use the ADB tool , the app you've chosen to disable will also get completely hidden from the app manager, even on the list of disabled apps.

The question

Is there an alternative to disabling apps, that will not hide apps when disabling them?

If so, what is it?

来源:https://stackoverflow.com/questions/23326140/is-it-possible-to-disable-apps-without-hiding-them

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!