how to uninstall a list of user installed apps from android?
<p>I have to remove all the apps from android tablet.So i used packet manager and i get the list of user installed apps.Now i have to uninstall all those user installed apps.my code is </p>

<pre><code>public class MainActivity extends Activity {

     private ListView lView;
     private ArrayList results = new ArrayList();

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

         lView = (ListView) findViewById(R.id.listView1);
          PackageManager pm = this.getPackageManager();

          Intent intent = new Intent(Intent.ACTION_MAIN, null);
          intent.addCategory(Intent.CATEGORY_LAUNCHER);


          List&lt;ApplicationInfo&gt; apps = pm.getInstalledApplications(0);

          List&lt;ApplicationInfo&gt; installedApps = new ArrayList&lt;ApplicationInfo&gt;();

          for(ApplicationInfo app : apps) {
              //checks for flags; if flagged, check if updated system app
              if((app.flags &amp; ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) == 1) {
                  installedApps.add(app);
              //it's a system app, not interested
              } else if ((app.flags &amp; ApplicationInfo.FLAG_SYSTEM) == 1) {
                  //Discard this one
              //in this case, it should be a user-installed app


              } else {
                  installedApps.add(app);

                  System.out.println("@@@@@@@@@@@@@@@@----&gt;"+installedApps);
                  lView.setAdapter(new ArrayAdapter(this, android.R.layout.simple_list_item_1,installedApps));

                  /* Intent i = new Intent(Intent.ACTION_DELETE);
                   i.setData(Uri.parse("package: ApplicationInfo" +installedApps));
                   startActivity(i);*/

                   Uri AppToDelete = Uri.parse("package:" + installedApps);
                   Intent RemoveApp = new Intent(Intent.ACTION_DELETE, AppToDelete);
                   startActivity(RemoveApp);
              }
          }
</code></pre>

<p>I have tried with Action_delete, but it asks for specific package name of app.But i want list of apps to be uninstalled.thanks for any help.</p>
