List of usage examples for android.content Intent ACTION_DELETE
String ACTION_DELETE
To view the source code for android.content Intent ACTION_DELETE.
Click Source Link
From source file:Main.java
public static Intent getUninstallAppIntent(String packageName) { Intent intent = new Intent(Intent.ACTION_DELETE); intent.setData(Uri.parse("package:" + packageName)); return intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); }
From source file:Main.java
public static Intent uninstall(String packageName) { Uri uri = Uri.parse("package:" + packageName); Intent intent = new Intent(Intent.ACTION_DELETE, uri); return intent; }
From source file:Main.java
private static void uninstallManually(Context context, String packageName) { Intent intent = new Intent(Intent.ACTION_DELETE, Uri.fromParts("package", packageName, null)); context.startActivity(intent);/*from ww w. ja v a 2 s . c om*/ }
From source file:Main.java
public static void uninstallApk(Context context, String packageName) { Intent intent = new Intent(Intent.ACTION_DELETE); Uri packageURI = Uri.parse("package:" + packageName); intent.setData(packageURI);//ww w . j a v a 2 s . co m context.startActivity(intent); }
From source file:Main.java
public static void uninstallApp(Context context, String appPackageName) { Intent intent = new Intent(Intent.ACTION_DELETE); intent.setData(Uri.parse("package:" + appPackageName)); context.startActivity(intent);/*from www . j a v a 2s . c o m*/ }
From source file:Main.java
public static void uninstallApk(Context context, String packageName) { Intent intent = new Intent(Intent.ACTION_DELETE); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); Uri packageURI = Uri.parse("package:" + packageName); intent.setData(packageURI);/* w w w .j a va 2s . co m*/ context.startActivity(intent); }
From source file:Main.java
public static void uninstall(Context context, String pkgname) { Intent intent = new Intent(); intent.setAction(Intent.ACTION_DELETE); intent.setData(Uri.parse("package:" + pkgname)); context.startActivity(intent);//from ww w . j a v a2 s . c o m }
From source file:Main.java
public static void unInstallApkFromPackage(Context context, String apk_pkg) { try {//from w ww . j av a 2 s .c o m Intent intent = new Intent(Intent.ACTION_DELETE); intent.setData(Uri.parse("package:" + apk_pkg)); context.startActivity(intent); } catch (Exception e) { e.printStackTrace(); } }
From source file:Main.java
private static void uninstallAppByClick(Context context, String pkgName) { Intent intent = new Intent(); intent.setAction(Intent.ACTION_DELETE); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.setData(Uri.parse("package:" + pkgName)); context.startActivity(intent);// ww w. ja va 2 s . c om }
From source file:Main.java
public static void uninstall(Context context, String pkg) { context.startActivity(new Intent(Intent.ACTION_DELETE, Uri.parse("package:" + pkg))); }