本文介绍了如何检查是否在 Android 4.0.3 上为 API 15 启用了开发者选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
限时送ChatGPT账号..我可以在高于 Api 17 的 API 中检查选项,但找不到适用于 Android 4.0.3 的 Api 15
I can check option in API higher than Api 17 but can't find Api 15 for Android 4.0.3
如何找到检查 Android API 15 的开发人员选项的解决方案?
How can i find solution for checking Developer options for Android API 15 ?
推荐答案
您可以执行以下操作,以编程方式检查是否启用了开发人员选项:
You can possibly do something like this to check programatically whether developer options are enabled:
int adb = Settings.Secure.getInt(this.getContentResolver(),
Settings.Global.DEVELOPMENT_SETTINGS_ENABLED , 0);
更新
对于低于 API 17 的 API,您可以使用以下内容来获取是否启用了 ADB.
For API less than API 17 you can use the following to get whether or not the ADB is enabled.
int adb = Settings.Secure.getInt(context.getContentResolver(), Settings.Secure.ADB_ENABLED, 0);
如果启用,则 adb == 1,否则 adb == 0.
If it is enabled, adb == 1, otherwise adb == 0.
希望这会有所帮助.
这篇关于如何检查是否在 Android 4.0.3 上为 API 15 启用了开发者选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
更多推荐
[db:关键词]
发布评论