目录

CLASS info
public class GeofenceData
地理围栏事件。

Public Method Summary

Return typeMethod name
GeofenceDatagetDataFromIntent(Intent intent)
intgetErrorCode()
intgetConversion()
List<Geofence>getConvertingGeofenceList()
LocationgetConvertingLocation()
booleanisSuccess()

Public Methods

Method
public GeofenceData getDataFromIntent(Intent intent)
从intent中解析出GeofenceData对象。

Parameters

Parameter nameParameter desc
intent当触发地理围栏事件时,广播传递的intent对象。

Return

typedesc
com.huawei.hms.location.GeofenceData地理围栏触发事件对象。
Method
public int getErrorCode()
获取错误码

Return

typedesc
int错误码,详情见GeofenceErrorCodes。
Method
public int getConversion()
获取地理围栏触发类型。

Return

typedesc
int地理围栏触发类型。
Method
public List<Geofence> getConvertingGeofenceList()
获取触发的地理围栏信息。

Return

typedesc
List<Geofence>触发的地理围栏信息。
Method
public Location getConvertingLocation()

获取触发时的位置信息。

注意:Location为Android原生类,具体介绍请参见Android开发文档。

Return

typedesc
android.location.Location位置信息。
Method
public boolean isSuccess()
是否是正常触发围栏事件,为false时表示出现出错

Return

typedesc
boolean是否是正常触发围栏事件。