Android - 是否可以获取桌面Web快捷方式的信息?

时间:2012-09-18 15:34:20

标签: android shortcut desktop-shortcut

我正在尝试创建一个应用,提供您在设备上安装的其他一些特定应用的信息。 Android允许您从包名称获取这些应用程序的信息,如图标,名称,版本等。

但是,我的应用程序还可以显示设备上的网页快捷方式,其中一些已预先安装在系统文件夹中。

我的问题是,有没有办法从这些快捷方式中获取信息?他们有一个id,我可以从中获取快捷方式图标,网址链接,名称?

2 个答案:

答案 0 :(得分:0)

Android没有桌面快捷方式这样的功能。 (如果我错了,请纠正我)

桌面快捷方式是特定主屏幕应用程序的功能。处理所有这些都很困难。

答案 1 :(得分:0)

您有ApplicationInfo:请参阅以下代码段:http://www.androidsnippets.com/get-installed-applications-with-name-package-name-version-and-icon。 在GooglePlay上,使用软件包名称识别Android应用程序,您可以使用它重定向到应用程序信息。 “market:// details?id =”查看此链接以获取更多信息: http://developer.android.com/distribute/googleplay/promote/linking.html

final Intent mainIntent = new Intent("android.intent.action.CREATE_SHORTCUT", null);

final List pkgAppsList = context.getPackageManager().queryIntentActivities( mainIntent, 0);

请参阅此问题:How to get a list of installed android applications and pick one to run