Prevent installing android app with specific package name

眉间皱痕 提交于 2019-12-12 19:16:05

问题


I am developing two android apps with android studio and for some reason I want just one of these apps can be installed on a device. I think I should check the package name of second app and prevent it from installing. Is there any way to do that? thanks.


回答1:


You can not prevent any app from being installation. Instead you can stop your app from being running. I mean, when your app starts, check if specific application is installed, and if so stop your application.




回答2:


An ordinary app cannot prevent another app from being installed. Malware authors would think that such a "feature" would be wonderful.

Device owner apps — mostly for IT departments at larger organizations — have some abilities here, though I forget whether they can block installation by package name.



来源:https://stackoverflow.com/questions/51223018/prevent-installing-android-app-with-specific-package-name

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!