是否可以卸载其他应用程序使用一个Android应用程序? [英] Is it possible to uninstall one android application from other application?

查看:203
本文介绍了是否可以卸载其他应用程序使用一个Android应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设有两种不同的Andr​​oid应用程序:A和B

Suppose there are two different Android apps: A and B.

应用程序A是一个系统管理员。有什么办法为它来卸载应用程序B或使其不起作用?

App A is a system admin. Is there any way for it to uninstall app B or make it non-functional?

推荐答案

是的,这是可能的,你需要使用 Intent.ACTION_DELETE 看看下面code,

Yes, it is possible, you need to use Intent.ACTION_DELETE have a look at following code,

Uri packageUri = Uri.parse("package:com.mypackgage");  
Intent uninstallIntent = new Intent(Intent.ACTION_DELETE,packageUri);  
startActivity(uninstallIntent);  

当你运行上面的code,它会要求卸载应用程序,如下所示,图像

when you run the above code, it will ask for uninstall application as follows, image

这篇关于是否可以卸载其他应用程序使用一个Android应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆