Settings.Gobal类在Android 4.2.2中不起作用?

时间:2014-03-21 02:41:27

标签: java android

我使用上面的类来显示以下结果:

AIRPLANE_MODE_ON=0
AIRPLANE_MODE_RADIOS=cell,bluetooth,wifi,nfc,wimax

我使用的代码如下:

Log.d("Airplane_mode_on",Settings.Global.getInt(mcontex.getContentResolver(), Global.AIRPLANE_MODE_ON))
Log.d("Airplane_mode_radios",Settings.Global.getString(mcontex.getContentResolver(),Global.AIRPLANE_MODE_RADIOS))

在Logcat中,它显示" Class Not Found Exception"。当我阅读Settings.Global的文档时,它说这个类与API 17兼容。任何建议? http://developer.android.com/reference/android/provider/Settings.Global.html

0 个答案:

没有答案