GeofenceStatusCodes

  • GeofenceStatusCodes provides status codes specific to geofencing operations.

  • These status codes can indicate issues such as insufficient location permission, geofence service not being available, or exceeding geofence limits.

  • You can use thegetStatusCodeString method to get a debug string for a given status code.

public final classGeofenceStatusCodes extendsCommonStatusCodes

Geofence specific status codes, for use inStatus.getStatusCode()

Constant Summary

int GEOFENCE_INSUFFICIENT_LOCATION_PERMISSIONThe client doesn't have sufficient location permission to perform geofencing operations.
int GEOFENCE_NOT_AVAILABLEGeofence service is not available now.
int GEOFENCE_REQUEST_TOO_FREQUENTYour app has been adding Geofences too frequently.
int GEOFENCE_TOO_MANY_GEOFENCESYour app has registered more than 100 geofences.
int GEOFENCE_TOO_MANY_PENDING_INTENTSYou have provided more than 5 different PendingIntents to the GeofencingApi.addGeofences(GoogleApiClient, GeofencingRequest, PendingIntent) call.

Inherited Constant Summary

From class com.google.android.gms.common.api.CommonStatusCodes
intAPI_NOT_CONNECTED
intCANCELED
intCONNECTION_SUSPENDED_DURING_CALL
intDEVELOPER_ERROR
intERROR
intINTERNAL_ERROR
intINTERRUPTED
intINVALID_ACCOUNT
intNETWORK_ERROR
intRECONNECTION_TIMED_OUT
intRECONNECTION_TIMED_OUT_DURING_UPDATE
intREMOTE_EXCEPTION
intRESOLUTION_REQUIRED
intSERVICE_DISABLED
intSERVICE_VERSION_UPDATE_REQUIRED
intSIGN_IN_REQUIRED
intSUCCESS
intSUCCESS_CACHE
intTIMEOUT

Public Method Summary

staticString
getStatusCodeString(int statusCode)
Returns an untranslated debug (not user-friendly!) string based on the current status code.

Inherited Method Summary

From class com.google.android.gms.common.api.CommonStatusCodes
staticString
getStatusCodeString(int arg0)
From class java.lang.Object
Object
clone()
boolean
equals(Object arg0)
void
finalize()
finalClass<?>
getClass()
int
hashCode()
final void
notify()
final void
notifyAll()
String
toString()
final void
wait(long arg0, int arg1)
final void
wait(long arg0)
final void
wait()

Constants

public static final intGEOFENCE_INSUFFICIENT_LOCATION_PERMISSION

The client doesn't have sufficient location permission to perform geofencing operations.

Constant Value:1004

public static final intGEOFENCE_NOT_AVAILABLE

Geofence service is not available now.

This can happen in the following conditions:

  • Device location has been turned off.
  • On Android P and above devices, Location Accuracy is off.
  • Below Android P, location mode has been set to "device only" mode. Geofence service is only available in "high accuracy" or "battery saving" mode.
Constant Value:1000

public static final intGEOFENCE_REQUEST_TOO_FREQUENT

Your app has been adding Geofences too frequently.

Constant Value:1005

public static final intGEOFENCE_TOO_MANY_GEOFENCES

Your app has registered more than 100 geofences. Remove unused ones before adding new geofences.

Constant Value:1001

public static final intGEOFENCE_TOO_MANY_PENDING_INTENTS

You have provided more than 5 different PendingIntents to the GeofencingApi.addGeofences(GoogleApiClient, GeofencingRequest, PendingIntent) call.

Constant Value:1002

Public Methods

public staticStringgetStatusCodeString(int statusCode)

Returns an untranslated debug (not user-friendly!) string based on the current status code.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2024-10-31 UTC.