Android的:反正知道“未知来源”被选中?来源、Android

2023-09-06 05:54:27 作者:有杀气的萝莉

有什么办法找出如果用户已经检查了未知来源复选框,在应用程序设置菜单?

Is there any way to find out if the user has checked the 'Unknown Sources' checkbox in the 'Application settings' menu?

推荐答案

您可以使用INSTALL_NON_MARKET_APPS环境。这样的事情:

You can use the INSTALL_NON_MARKET_APPS setting. Something like that :

boolean canInstallFromOtherSources = Settings.Secure.getInt(Settings.Secure.INSTALL_NON_MARKET_APPS) == 1;