Uninstall apk - Android App

Android examples for App:APK Install and Uninstall

Description

Uninstall apk

Demo 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 pkName) {
        Uri packageURI = Uri.parse(pkName);
        Intent uninstallIntent = new Intent(Intent.ACTION_DELETE,
                packageURI);/*from   w  w  w.  ja v  a 2  s . c o  m*/
        context.startActivity(uninstallIntent);
    }
}

Related Tutorials