简体   繁体   English

在Android中禁用警告消息

[英]Disable Warning message in android

I am developing android application and I updated this application from to remote When I send push mesage it can be updated itself. 我正在开发android应用程序,并且已将此应用程序从远程更新为更新。当我发送推送消息时,它可以自行更新。 Firstly I am deleting old application and then I am installing new application. 首先,我要删除旧应用程序,然后再安装新应用程序。 When I delete old application it asks me Are you sure want to delete this app? 当我删除旧应用程序时,它会问我您确定要删除此应用程序吗? I don't want to see this warning message Can I disable this message or Can I give automatically "Ok" answer in android code? 我不想看到此警告消息我可以禁用此消息还是可以在Android代码中自动给出“确定”答案?

I use to delete app below code 我用来删除以下代码的应用程序

Uri packageURI = Uri.parse("package:com.androidhive.pushnotifications");
Intent uninstallIntent = new Intent(Intent.ACTION_DELETE, packageURI);
startActivity(uninstallIntent);

Can I disable this message? 我可以禁用此消息吗?

No. 没有。

Can I give automatically "Ok" answer in android code? 我可以在Android代码中自动给出“确定”答案吗?

No. 没有。

Think about this from the user's perspective- do they want apps to be able to uninstall other applications without their knowledge or consent? 从用户的角度考虑这一点-他们是否希望应用程序能够在未经其知情或同意的情况下卸载其他应用程序? While you may have good intentions, this opens up huge security holes that others could exploit. 尽管可能有良好的意图,但这会打开其他人可以利用的巨大安全漏洞。

If you are deploying this application in an environment that you control (eg an enterprise setting), then you may be able to root the devices to gain this control. 如果要在您控制的环境(例如企业设置)中部署此应用程序,则可以使设备成为root用户以获得该控制权。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM