android 调用设置页面开启gps
2014-01-13 16:07
507 查看
找了很多,有些代码不能调用设置的gps开启页面,这个可行
public void openGPS(Context context) {
Intent intent=new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
startActivityForResult(intent,0); //设置完成后返回到原来的界面
}
public void openGPS(Context context) {
Intent intent=new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
startActivityForResult(intent,0); //设置完成后返回到原来的界面
}
相关文章推荐
- 恢复 android logcat 不输出
- android 4.3源码下载【自己下载成功的步骤、其中遇到很多你可能会遇到的很多问题】
- Android input keyevent
- android替换fprintf使得打印可以输出到logcat中
- Android 解析JSON
- 假如有了android电脑系统
- Android混淆带有so文件的工程
- Android启动另一个apk程序
- Android:TextView跑马灯-详解
- android 使用uinput模拟输入设备的方法
- android 添加文件打开方式
- Android 通过(Parcelable)序列化ArrayList实现Activity间传递ArrayList
- Android 播放Gif 动画
- Android 播放Gif 动画
- android应用完全退出的方法
- 蓝桥杯 特殊回文数的查找
- 通过ant脚本编译打包android工程
- 40 Android fragment (二)
- Android 测试工程更换被测工程
- android paddingLeft 和 layout_marginLeft的区别