android GPS LocationListener类 .
来源:互联网 发布:mac gitignore 编辑:程序博客网 时间:2024/06/05 05:44
结构
继承关系
public interface LocationListener
android.location.LocationListener
类概述
用于接收从LocationManager的位置发生改变时的通知。如果LocationListener被注册添加到LocationManager对象,并且此LocationManager对象调用了requestLocationUpdates(String, long, float, LocationListener)方法,那么接口中的相关方法将会被调用
公共方法
public abstract void onLocationChanged (Location location)
此方法在当位置发生改变后被调用。这里可以没有限制的使用Location对象。
参数
位置发生变化后的新位置。
public abstract void onProviderDisabled(String provider)
此方法在provider被用户关闭后被调用,如果基于一个已经关闭了的provider调用requestLocationUpdates方法被调用,那么这个方法理解被调用。
参数
与之关联的location provider名称。
public abstract void onPorviderEnabled (Location location)
此方法在provider被用户开启后调用。
参数
provider 与之关联的location provider名称。
public abstract void onStatusChanged (String provider, int Status, Bundle extras)
此方法在Provider的状态在可用、暂时不可用和无服务三个状态直接切换时被调用。
参数
provider 与变化相关的location provider名称。
status 如果服务已停止,并且在短时间内不会改变,状态码为OUT_OF_SERVICE;如果服务暂时停止,并且在短时间内会恢复,状态码为TEMPORARILY_UNAVAILABLE;如果服务正常有效,状态码为AVAILABLE。
extras 一组可选参数,其包含provider的特定状态。下面列出一组共用的键值对,其实任何键的provider都需要提供的值。•定位卫星 – 一组用于设备定位的卫星
- android GPS LocationListener类
- android GPS LocationListener类 .
- Android之GPS定位类 LocationManager、LocationListener、GpsStatus.Listener、Location详解
- Android之GPS定位类 LocationManager、LocationListener、GpsStatus.Listener、Location详解
- Android解决GPS定位时LocationManager只能绑定一个LocationListener的问题
- 如果LocationListener中onStatusChanged无法返回实时GPS定位状态可以通过卫星已定位辅助判断
- Android GPS
- Android GPS
- android GpS
- android gps
- android GPS
- android GPS
- Android GPS
- android GPS
- android GPS
- Android GPS
- Android GPS
- Android Gps
- 省赛训练之并查集(五)
- Android - Unparsed aapt error(s)错误的处理方法
- java泛型(三)、通配符的使用
- iOS html解析1(包含中文字符)
- 2012830开始下一轮学习
- android GPS LocationListener类 .
- CoreData 理解和编程
- 在linux下用qt打开或直接读取文件及其中的问题!(system(),qfile,qprocess)
- Mac os 相关设置
- nmake使用
- PMP考试的形式和试题分布
- originate 返回条件
- 设计模式六大原则(3):依赖倒置原则
- 【转载】做优秀程序员