static boolean isAirplaneModeOn(Context context) {
return Settings.System.getInt(context.getContentResolver(),
Settings.System.AIRPLANE_MODE_ON, 0) != 0;
}
这是Settings中取得飞行模式的代码
return Settings.System.getInt(context.getContentResolver(),
Settings.System.AIRPLANE_MODE_ON, 0) != 0;
}
这是Settings中取得飞行模式的代码
解决方案 »
- 为什么SurfaceView卡住了
- new ImageSwitcher.LayoutParams(-1, -1)什么意思?为什么要设置为-1
- 急 急 急!关于FragmentPagerAdapter 滑动的问题
- 智能机那些事
- 关于GPS定位的问题
- android怎么成功调用自己写的jar包
- android app widget中使用自定义view
- listview中一行中的有一个cell是多行文本,其他单行文本cell的高度怎么调整为与之相同
- Android应用商店下载软件,进度条更新和开始、暂停按钮失效的问题
- 明明下载了emulator,却提示installed no emulator,更别提启动模拟器了
- 创建Widget时的内存泄漏问题
- 输入框最后有个小叉叉,一点击这个叉叉内容全部清空的控件
Settings.System.putInt(mContext.getContentResolver(),Settings.System.AIRPLANE_MODE_ON, enabling ? 1 : 0);//这段代码可以跳转到打开飞行模式那一个页面,看你用的上不
Intent mIntent = new Intent("/");
ComponentName comp = new ComponentName("com.android.settings",
"com.android.settings.WirelessSettings");
mIntent.setComponent(comp);
mIntent.setAction("<span class=\"hilite\">android</span>.intent.action.VIEW");
startActivity(mIntent);