LocationManager
来源:互联网 发布:视频同步软件 编辑:程序博客网 时间:2024/06/05 05:54
LocationManager
Android 中一般有三种位置提供器可供选择:
GPS_PROVIDER(LocationManager.GPS_PROVIDER = gps)
NETWORK_PROVIDER (LocationManager.NETWORK_PROVIDER = network)
PASSIVE_PROVIDER(LocationManager.PASSIVE_PROVIDER = passive)
两种权限:
1. android.permission.ACCESS_FINE_LOCATION
2. android.permission.ACCESS_COARSE_LOCATION
下面分析两种权限下可用的位置提供器:
执行代码:
locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);List<String> providerList = locationManager.getProviders(true);
LINE 时:
什么都不开,list 含有 passive, network;
开数据,同上;
开wifi,同上;
开GPS,同上,gps;
COARSE 时:
什么都不开,list 含有 network;
开数据,同上;
开wifi,同上;
开GPS,同上;
0 0
- LocationManager
- LocationManager
- LocationManager
- LocationManager
- Android--LocationManager
- 定位LocationManager
- LocationManager定位
- Android LocationManager 使用
- Android LocationManager 使用
- Location服务之LocationManager
- Android LocationManager 使用
- LocationManager基本用法
- Android LocationManager 使用
- 位置管理器:LocationManager
- LocationManager 的简单使用
- Android 位置管理器(LocationManager)
- android LocationManager的使用
- Location服务之LocationManager
- 图标旋转
- java基础学习总结——流
- 用代码实现时钟功能
- iOS开发-UI控件:iPhone iPad 各种控件默认高度
- QCA4010 AllJoyn编译
- LocationManager
- vim简单配置 缩进
- placement new 详解
- android-App Widget Host
- 代数-函数
- 拖动手势实现代码
- Lisp入门教程
- 5. 尚硅谷_佟刚_JavaWEB_Servlet 的配置及生命周期方法.wmv
- 单例模式7种实现