Android remove app from listview after deleting it
<p>I have a list of user installed applications. When I click on one to delete it says it gets deleted but when I go back to the listview the icon is still showing in the listview and when I try to click on it it says that the app has been uninstalled. How do I make it get removed from the listview after I have deleted it?</p>

<p>I want to update my listview but unsure how to</p>

<p>Here is some code</p>

<p>public void update() {
        // TODO
        mAppListAdapter.clear();</p>

<pre><code>    Intent aIntent = new Intent(Intent.ACTION_MAIN, null);
    aIntent.addCategory(Intent.CATEGORY_LAUNCHER);

    PackageManager aPackageManager = getPackageManager();
    List &lt;ResolveInfo&gt; aList = aPackageManager.queryIntentActivities(aIntent, PackageManager.GET_UNINSTALLED_PACKAGES);





    for( ResolveInfo rInfo : aList ) {
         if (!isSystemPackage(rInfo)) 
        mAppListAdapter.add(rInfo.activityInfo.applicationInfo);
         //for (int n=0;n&lt;aList.size();n++) {           
                //if((aList.get(n).flags &amp; ApplicationInfo.FLAG_SYSTEM)!=1)

        System.out.println("Installed Applications "  +  rInfo.activityInfo.applicationInfo.loadLabel(aPackageManager).toString()); 
    }

    if( mListView != null ) {
        mListView.setAdapter( mAppListAdapter );



    }
    }
</code></pre>
