简体   繁体   English

如何在没有root设备的情况下隐藏Android设备中的任何应用程序?

[英]How to hide any application in android device without rooting my device?

I am developing an Android application. 我正在开发一个Android应用程序。 I want to hide any application icon (whatsapp,etc ....) in my android device and I want to start my application by pressing some numbers, for instance 456#. 我想在我的Android设备中隐藏任何应用程序图标(whatsapp等等),我想通过按一些数字来启动我的应用程序,例如456#。 Is there a way to do this? 有没有办法做到这一点?

I know how to hide my app icon but i want to search how to hide other application icon. 我知道如何隐藏我的应用程序图标,但我想搜索如何隐藏其他应用程序图标。

Plz help me, thanx in advance. Plz提前帮助我。

So many question you have asked in your single query.Let me filter that. 你在单个查询中提出了很多问题。让我过滤一下。

I know how to my app icon hide but i want to search how to hide other application icon. 我知道如何隐藏我的应用程序图标,但我想搜索如何隐藏其他应用程序图标。

Basically you just have to pass Package name & Launcher activity of that application. 基本上你只需要传递该应用程序的Package name和Launcher活动。

PackageManager p = getPackageManager();
ComponentName componentName = new ComponentName("YOUR_PACKAGE_NAME", "YOUR_PACKAGE_NAME.LAUNCHER_ACTIVITY_NAME");
p.setComponentEnabledSetting(componentName, PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);

How to find the Launcher Activity of Installed App ? 如何找到已安装App的Launcher活动?

In below code you will get launcher activity of all installed apps. 在下面的代码中,您将获得所有已安装应用的启动器活动。

final PackageManager pm = getPackageManager();

Intent mainIntent = new Intent(Intent.ACTION_MAIN, null);
mainIntent.addCategory(Intent.CATEGORY_LAUNCHER);

List < ResolveInfo > appList = pm.queryIntentActivities(mainIntent, 0);
Collections.sort(appList, new ResolveInfo.DisplayNameComparator(pm));

for (ResolveInfo temp: appList) {
    Log.v("my logs", "package and activity name = " + temp.activityInfo.packageName + "    " + temp.activityInfo.name);
}

I want to start my application by pressing some numbers, for instance 456# 我想通过按一些数字来启动我的应用程序,例如456#

Check reference link 检查参考链接

So, Now you have almost done as you want try once and let me know. 所以,现在你几乎已经完成了,你想尝试一次让我知道。

The easiest way to hide or unhide any app is through cmd you have to only a command and buff.. its done 隐藏或取消隐藏任何应用程序的最简单方法是通过cmd,你只需要一个命令和buff ..它完成了

  * for disable in Kitkat

String cmd = "pm disable" + packageName; String cmd =“pm disable”+ packageName; Shell.SU.run(cmd); Shell.SU.run(CMD);

  • for enable in Kitkat 在Kitkat启用

    String cmd = "pm enable " + packageName; String cmd =“pm enable”+ packageName;

    Shell.SU.run(cmd); Shell.SU.run(CMD);

    • for hide in lollipop 在棒棒糖中隐藏

    String cmd = "pm hide " + packageName; String cmd =“pm hide”+ packageName;

    Shell.SU.run(cmd); Shell.SU.run(CMD);

  • for Unhide in lollipop 在棒棒糖中取消隐藏

    String cmd = "pm hide " + packageName; String cmd =“pm hide”+ packageName;

    Shell.SU.run(cmd); Shell.SU.run(CMD);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在没有root设备的情况下捕获其他Android应用程序的屏幕截图? - How to capture a screenshot of other Android application without rooting device? 如何在不扎根Android设备的情况下访问文件 - How to access files without rooting on an Android device 如何在不生根的情况下禁用Android设备的hdmi端口? - How do i disable hdmi port of a android device without rooting it? 如何在不root设备的情况下将应用转换为android +5.0中的系统应用? - How to convert an app to be a system app in android +5.0 without rooting the device? 我可以以编程方式截取主屏幕,而无需root我的Android设备吗? - Can I take screenshot of home screen programmatically ,without rooting my android device? 通过植根设备可访问Android权限? - Android Permissions accessible by rooting the device? 用于生根设备的Android屏幕截图捕获 - Android screenshot capture for rooting device 用于生根设备的Android广播接收器 - Android Broadcast receiver for rooting device 如何在不生根的情况下从我的android设备监视器访问数据/数据? - how can I accesses to data/data from my android device monitor with out rooting my phone? [Android]无需root手机即可确定wifi绑定设备的发射功率 - [Android]Determine the transmit power of a wifi tethered device without rooting the phone
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM