How to check whether an application can be uninstalled?
<p>I use the <strong>PackageManager</strong> to get the list of installed Android applications. But some stock applications cannot be uninstalled from the device. How do I check for those programmatically?</p>

<pre><code>Intent i = new Intent(Intent.ACTION_MAIN, null);
i.addCategory(Intent.CATEGORY_LAUNCHER);
PackageManager pm = this.getPackageManager();
List&lt;ResolveInfo&gt; activities = pm.queryIntentActivities
                                   (i, PackageManager.PERMISSION_GRANTED);
</code></pre>
