How to differentiate the applications with same name in android?
<p>In android I am listing the installed application list and storing in my private db. In that some application have same name, example there are 4 application named Maps, If one  application gets update, other 3 applications records in private db get updated. How to differentiate those applications? I have used following code to get the installed application list.</p>

<pre><code>PackageManager pm = this.getPackageManager();
    Intent intent = new Intent(Intent.ACTION_MAIN, null);
    intent.addCategory(Intent.CATEGORY_LAUNCHER);

    List&lt;ResolveInfo&gt; list = pm.queryIntentActivities(intent,
            PackageManager.PERMISSION_GRANTED);
    ArrayList&lt;String&gt; applist = new ArrayList&lt;String&gt;();
    ArrayList&lt;String&gt; packlist = new ArrayList&lt;String&gt;();

    for (ResolveInfo rInfo : list) {
        packlist.add(rInfo.activityInfo.packageName);
        applist.add(rInfo.activityInfo.applicationInfo.loadLabel(pm)
                .toString());
    }
</code></pre>
