OnLocationChangeListener

interface OnLocationChangeListener

Functions

getLastKnownLocation
Link copied to clipboard
abstract fun getLastKnownLocation(location: Location)
获取最后一次保留的坐标
onLocationChanged
Link copied to clipboard
abstract fun onLocationChanged(location: Location)
当坐标改变时触发此函数,如果Provider传进相同的坐标,它就不会被触发
onStatusChanged
Link copied to clipboard
abstract fun onStatusChanged(provider: String, status: Int, extras: Bundle)
provider的在可用、暂时不可用和无服务三个状态直接切换时触发此函数