由网友(晓风残杨柳)分享简介:我需要检查在Android设备的自动日期和时间是否启用。如果没有启用,我需要显示弹出式,它未启用。 I need to check whether "Automatic date and time" in the android device is enabled or not. If it is not enabl...
我需要检查在Android设备的自动日期和时间是否启用。如果没有启用,我需要显示弹出式,它未启用。
I need to check whether "Automatic date and time" in the android device is enabled or not. If it is not enabled I need to display the popup that it is not enabled.
是否有可能实现的。如果可能的话,如何检查启用与否?
Is it possible to achieve. If possible, how to check enabled or not ?
推荐答案
链接的API 17岁以上
android.provider.Settings.Global.getInt(getContentResolver(), android.provider.Settings.Global.AUTO_TIME, 0);
链接的API 16及以下
android.provider.Settings.System.getInt(getContentResolver(), android.provider.Settings.System.AUTO_TIME, 0);
相关推荐
最新文章