1

I'm trying to create an app that gives information of some other specific apps that you have installed on your device. Android lets you, from the package name, to get information of these apps such as icon, name, version, etc.

However, my app will also be able to display the web pages' shortcuts that are on the device, some of them came pre-installed in system folder.

My question is, is there a way to get information from these shortcuts? Do they have an id from which I can get the shortcut icon, url link, given name?

htafoya
  • 18,261
  • 11
  • 80
  • 104

2 Answers2

0

Android does not have such feature as desktop shortcut. (Correct me if I wrong)

Desktop shortcuts are feature of specific home screen application. It would be very hard to handle all of them.

logcat
  • 3,435
  • 1
  • 29
  • 44
0

You have ApplicationInfo : see this code snippet: http://www.androidsnippets.com/get-installed-applications-with-name-package-name-version-and-icon. On GooglePlay android application are identified using their package name, you can redirect to application info using it. "market://details?id=" see this link for more infos: 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);

See this question: How to get a list of installed android applications and pick one to run

Community
  • 1
  • 1
Anis BEN NSIR
  • 2,555
  • 20
  • 29
  • Yes I know how to get app information, however the web shortcuts are not applications thus they don't have a package name, they are just shortcuts in there that open the browser. But they should have their information saved somewhere as they have an icon, name, reference link, etc. – htafoya Sep 22 '12 at 02:40
  • to have a shortcut an Activity must declare: Try to make a filter on this, maybe it works, i have updated my answer. – Anis BEN NSIR Sep 22 '12 at 13:11
  • Hi, you are not understanding my question. I don't want to create shortcuts, the shortcuts are already created, but I want to get those shortcuts information. And the shortcuts doesn't open apps or activities, they open webpages. – htafoya Sep 24 '12 at 14:28
  • well, to get the list of all available shortcut on the device, try the codd snippet on my answer. just remove mainIntent.addCategory(Intent.CATEGORY_LAUNCHER); because your shortcut just open a webUrl. – Anis BEN NSIR Sep 25 '12 at 01:20