Stay organized with collections Save and categorize content based on your preferences.
Represents a geographical region, also known as a geofence. Geofences can be monitored by geofencer service. And when the user crosses the boundary of a geofence, an alert will be generated.
Nested Class Summary Constant Summary Public Method Summary Constants public static final int GEOFENCE_TRANSITION_DWELL public static final int GEOFENCE_TRANSITION_ENTERThe transition type indicating that the user enters the geofence(s).
Constant Value: 1
public static final int GEOFENCE_TRANSITION_EXITThe transition type indicating that the user exits the geofence(s).
Constant Value: 2
public static final long NEVER_EXPIREExpiration value that indicates the geofence should never expire.
Constant Value: -1
Public Methods public abstract long getExpirationTime ()Returns the expiration elapsed realtime of geofence in milliseconds, or NEVER_EXPIRE
if there's no expiration. When positive, this geofence will be removed automatically after that time.
Returns latitude in degrees, between -90 and +90 inclusive.
public abstract int getLoiteringDelay () public abstract double getLongitude ()Returns longitude in degrees, between -180 and +180 inclusive.
public abstract int getNotificationResponsiveness ()Returns the best-effort description of how soon should the callback be called when the transition associated with the geofence is triggered, in milliseconds.
public abstract float getRadius ()Returns radius in meters.
public abstract String getRequestId ()Returns the request ID of this geofence. The request ID is a string to identify this geofence inside your application. When two geofences with the same requestId are monitored, the new one will replace the old one regardless the geographical region these two geofences represent.
public abstract int getTransitionTypes ()Returns the transition types of interest as a bitwise-OR of GEOFENCE_TRANSITION_
flags.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["`Geofence` represents a geographical region that can be monitored for user entry, exit, and dwelling."],["When a user crosses a geofence boundary, an alert is generated by the geofencer service."],["Developers can define the geofence's latitude, longitude, radius, and transition types using the `Geofence.Builder` class."],["`Geofence` provides methods to retrieve information about the geofence, such as expiration time, transition types, and request ID."],["Constants like `GEOFENCE_TRANSITION_ENTER`, `GEOFENCE_TRANSITION_EXIT`, and `GEOFENCE_TRANSITION_DWELL` define the types of geofence transitions."]]],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4