Android APK Installation Check uninstallApk(Context context, String packageName)

Here you can find the source of uninstallApk(Context context, String packageName)

Description

uninstall Apk

Declaration

public static void uninstallApk(Context context, String packageName) 

Method Source Code

//package com.java2s;

import android.content.Context;
import android.content.Intent;

import android.net.Uri;

public class Main {

    public static void uninstallApk(Context context, String packageName) {
        Intent intent = new Intent(Intent.ACTION_DELETE);
        Uri packageURI = Uri.parse("package:" + packageName);
        intent.setData(packageURI);/*from w w w .  j  a  va2 s. c o m*/
        context.startActivity(intent);
    }
}

Related

  1. isAppInstalled(Context ctx, String uri)
  2. isApkInstalled(Context context, String packageName)
  3. installApk(Context context, File file)
  4. installApk(Context context, File file)
  5. verifySampleSetup(Activity activity, int... resIds)
  6. installWatchapp(final Activity parent, final String pbwFilename, final String appstoreUid)