GPS是否开启LocationManager locationManager = (LocationManager)getContext().getSystemService(Context.LOCATION_SERVICE);return locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER);进入GPS设置页面        Intent intent = new Intent();        intent.setAction(Settings.ACTION_LOCATION_SOURCE_SETTINGS);        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);        try         {            getContext().startActivity(intent);                                        } catch(ActivityNotFoundException ex)         {                        // The Android SDK doc says that the location settings activity            // may not be found. In that case show the general settings.                        // General settings activity            intent.setAction(Settings.ACTION_SETTINGS);            try {                   getContext().startActivity(intent);            } catch (Exception e) {            }        }

更多相关文章

  1. Android WebView 页面自适应
  2. Android 开发之webview页面返回到最顶关闭
  3. android 页面切换动画效果 转
  4. android > intent > 自动跳转到 系统 设置 页面
  5. Android之TabLayout+ViewPager+Fragment实现标题栏与页面联动
  6. Android实现页面悬浮显示
  7. React Native Linking与 Android原生页面路由跳转问题
  8. 如何在android中实现swipe的手势功能及页面拖动动画
  9. Android 使用WebView加载含有echarts的页面,截图不显示的解决方式

随机推荐

  1. mysql的事务,隔离级别和锁用法实例分析
  2. mysql5.7 生成列 generated column用法实
  3. mysql8 公用表表达式CTE的使用方法实例分
  4. mysql中left join设置条件在on与where时
  5. mysql5.7 新增的json字段类型用法实例分
  6. mysql中各种常见join连表查询实例总结
  7. mysql 主从数据不一致,提示: Slave_SQL_Ru
  8. mysql 中 replace into 与 insert into o
  9. 解决MySQL server has gone away错误的方
  10. centos7环境下创建mysql5.6多实例的方法