编程方式查找是否来自未知来源的安装允许 [英] Programatically find whether installing from unknown sources is allowed

查看:142
本文介绍了编程方式查找是否来自未知来源的安装允许的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要找到当前的Andr​​oid设备是否允许并非来自市场上的其它安装应用程序。此选项出现在设置界面下的一个名为未知来源应用程序。

I need to find whether the current Android device allows to install apps from sources other than the market. This option appears in the settings UI under Applications named "Unknown sources".

设置基本上可以让你下载和安装的APK这并没有从谷歌应用市场的起源。

The setting basically allows you to download and install APKs that did not originate from the Google app market.

如何查看该标志是否打开或关闭使用code?

How do I check whether this flag is on or off using code?

推荐答案

这个设置被称为<一href="http://developer.android.com/reference/android/provider/Settings.Secure.html#INSTALL_NON_MARKET_APPS">INSTALL_NON_MARKET_APP" (点击查看文档)。

(我基本已经输入的问题时,我发现内心深处隐藏的文件,使用不同的名称的答案,所以我决定发布问题和自我回答,因为它是不平凡的。)

(I basically already typed the question when I found the answer hidden deep within documentation, with a different name, so I decided to post the question and self answer, since it's not trivial.)

这篇关于编程方式查找是否来自未知来源的安装允许的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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