目录

CLASS info
public class GeofenceData
Geofence event

Public Method Summary

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

isSuccess()

Public Methods

Method
public GeofenceData getDataFromIntent(Intent intent)
This API is used to create a GeofenceData object from a specified intent.

Parameters

Parameter nameParameter desc
intentIntent object broadcasted when a geofence event is converted.

Return

typedesc
com.huawei.hms.location.GeofenceDataGeofence convert event object.
Method
public int getErrorCode()
This API is used to obtain an error code.

Return

typedesc
intError code. For details, please refer to GeofenceErrorCodes.
Method
public int getConversion()
This API is used to obtain the convert type of a geofence.

Return

typedesc
intGeofence convert type.
Method
public List<Geofence> getConvertingGeofenceList()
This API is used to obtain information about converted geofences.

Return

typedesc
List<Geofence>Information about converted geofences.
Method
public Location getConvertingLocation()

This API is used to obtain the location when a geofence is converted.

Note: The Location class is a native class of Android. For details, please refer to the Android development document.

Return

typedesc
android.location.LocationLocation information.
Method
public boolean isSuccess()
This API is used to check whether notification broadcasting is success

Return

typedesc
booleanIndicates whether notification broadcasting is success.