简体   繁体   English

Android存储桌面图标在哪里?

[英]Where does Android store desktop icons?

Once an app is installed, where android store icons shown on app drawer? 一旦安装了应用程序,应用程序抽屉上显示的android商店图标在哪里? in which path? 在哪条路? I tried to remove it programmatically but without success. 我尝试以编程方式删除它但没有成功。 An alternative should be to refresh the app drawer. 另一种方法是刷新app抽屉。 Possible on rooted phones? 根电话可能吗?

With the following code you will get icon and name for running applications, modify it to get normal applications etc. 使用以下代码,您将获得运行应用程序的图标和名称,修改它以获得正常的应用程序等。

c is your application Context. c是您的应用程序上下文。

ActivityManager activityManager = (ActivityManager) c
            .getSystemService(Context.ACTIVITY_SERVICE);
List<RunningAppProcessInfo> rapiList = getRunningAppProcesses(c); //running or whatever
RunningAppProcessInfo rapi = rapiList.get(i); //iterate

Drawable icon = c.getPackageManager().getApplicationIcon(rapi.processName);
String name = c.getPackageManager().getApplicationLabel(c.getPackageManager().getApplicationInfo(rapi.processName, 128)).toString();

So the icons are part of the application process, not sure you can delete them, maybe you can modify your launcher (get a custom one) 所以图标是应用程序进程的一部分,不确定你是否可以删除它们,也许你可以修改你的启动器(得到一个自定义的)

You can study the source code at this url: 您可以在此网址上学习源代码:

https://github.com/WouterSpaans/APK-Edit--Java- https://github.com/WouterSpaans/APK-Edit--Java-

This tool can edit app icons. 此工具可以编辑应用程序图标。

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

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