uninstall App by package - Android App

Android examples for App:APK Install and Uninstall

Description

uninstall App by package

Demo Code


//package com.java2s;

import android.content.Intent;
import android.net.Uri;

public class Main {
    public static Intent uninstall(String packageName) {
        Uri uri = Uri.parse("package:" + packageName);
        Intent intent = new Intent(Intent.ACTION_DELETE, uri);
        return intent;
    }//from   w ww. j a  v a2  s.  co m
}

Related Tutorials