We use essential cookies for the website to function, as well as analytics cookies for analyzing and creating statistics of the website performance. To agree to the use of analytics cookies, click "Accept All". You can manage your preferences at any time by clicking "Cookie Settings" on the footer. More Information.

Only Essential Cookies
Accept All

Documents from this version have been archived, and will not continue to be maintained. Please use the latest version.

HMS Core ReferencesLocation KitLocationGeofenceErrorCodes

GeofenceErrorCodes

CLASS info
public final class GeofenceErrorCodes extends CommonStatusCodes
Geofence status code

Constant Summary

TypeNameDesc
intGEOFENCE_UNAVAILABLEThe geofence service is unavailable.
intGEOFENCE_NUMBER_OVER_LIMIT

A maximum of 100 geofences can be added for an app.

intGEOFENCE_PENDINGINTENT_OVER_LIMITA maximum of 5 PendingIntents can be used to add geofences.
intGEOFENCE_INSUFFICIENT_PERMISSIONInsufficient permission to perform geofence-related operations.
intGEOFENCE_REQUEST_TOO_OFTENGeofences are added too frequently.

Public Method Summary

Return typeMethod name
StringgetErrorMessage(int statusCode)

Constants

Constant
int GEOFENCE_UNAVAILABLE

The geofence service is unavailable.

Constant Value: 10200

Constant
int GEOFENCE_NUMBER_OVER_LIMIT

A maximum of 100 geofences can be added for an app.

Constant Value: 10201

Constant
int GEOFENCE_PENDINGINTENT_OVER_LIMIT

A maximum of 5 PendingIntents can be used to add geofences.

Constant Value: 10202

Constant
int GEOFENCE_INSUFFICIENT_PERMISSION

Insufficient permission to perform geofence-related operations.

Constant Value: 10204

Constant
int GEOFENCE_REQUEST_TOO_OFTEN

Geofences are added too frequently.

Constant Value: 10205

Public Methods

Method
public String getErrorMessage(int statusCode)
This API is used to obtain the status information based on the status code.

Parameters

Parameter nameParameter desc
statusCodeStatus code.

Return

typedesc
StringStatus information.
This page may contain third-party content. For details, click here.
Search in References
Enter a keyword.