目录

public abstract interface LocationSource

LocationSource定义了一个位置源,提供定位数据。

Public Fields

无

Constructor

无

Public Method Summary

Return typeMethod name
abstract voidactivate(LocationSource.OnLocationChangedListener listener)
abstract voiddeactivate()

Nested Class Summary

ClassFunction
LocationSource.OnLocationChangedListener位置改变监听器。

Public Methods

Method
public abstract void activate(LocationSource.OnLocationChangedListener listener)
开发者调用此API可以激活位置源,并监听位置更新。


Parameters:

Parameter nameParameter desc
listener位置改变监听器。


Return:
无
Exception:

Exception typeScenario
IllegalStateException提供的位置源已经激活。
IllegalArgumentException监听器为null。
Method
public abstract void deactivate()
开发者调用此API停用位置源。


Parameters:
无
Return:
无
Exception:

Exception typeScenario
IllegalStateException位置源没有被激活。