How to list all the shortcuts supported in android programmtically?
<p>How to list all the shortcuts supported in android programmtically?</p>

<p>I would like to list all the shortcuts supported in the android, and let users are able to choose a shortcut in my android app.</p>

<p>Then, I want to launch that shortcut in my android app.</p>

<p>How do I program these in my android app?</p>

<p>Thanks a lot.</p>

<p>The shortcuts here means app use the "android.intent.action.CREATE_SHORTCUT" to install their shortcut in the Homescreen or other app.</p>

<hr>

<p>I use the following method to get the application list, but I can't found out how to get a shortcut list. I've tried to search on this forum, but not found any answer.</p>

<pre><code>  List&lt;PackageInfo&gt; appList = mPm.getInstalledPackages(0);
    PackageInfo packageInfo = null;

    // Loop through all installed packaged to get a list of used permissions and PackageInfos
    for (PackageInfo pi : appList) 
    {


        packageInfo = mPm.getPackageInfo(pi.packageName, PackageManager.GET_ACTIVITIES);

        if(packageInfo != null)
        {
            if(packageInfo.activities != null)
            {
                if(packageInfo.activities.length &gt; 0)
                {
                    ...
                }
            }
        }
    }
</code></pre>
