This class is deprecated.
The Awareness API is deprecated and will be turned down in a future Google Play services
release, as early as January 2027. There is no direct replacement.
Builder for a FenceUpdateRequest.
Public Constructor Summary
|
Builder()
This constructor is deprecated. The Awareness API is deprecated and will be
turned down in a future Google Play services release, as early as January 2027.
There is no direct replacement.
|
Public Method Summary
| FenceUpdateRequest.Builder |
addFence(String key,
AwarenessFence fence, PendingIntent
pendingIntent)
This method is deprecated. The Awareness API is deprecated and will be
turned down in a future Google Play services release, as early as January 2027.
There is no direct replacement.
|
| FenceUpdateRequest |
build()
This method is deprecated. The Awareness API is deprecated and will be
turned down in a future Google Play services release, as early as January 2027.
There is no direct replacement.
|
| FenceUpdateRequest.Builder |
removeFence(String key)
This method is deprecated. The Awareness API is deprecated and will be
turned down in a future Google Play services release, as early as January 2027.
There is no direct replacement.
|
| FenceUpdateRequest.Builder |
removeFence(PendingIntent
pendingIntent)
This method is deprecated. The Awareness API is deprecated and will be
turned down in a future Google Play services release, as early as January 2027.
There is no direct replacement.
|
Inherited Method Summary
Public Constructors
public Builder ()
This constructor is deprecated.
The Awareness API is deprecated and will be turned down in a future Google Play services
release, as early as January 2027. There is no direct replacement.
Builder for a FenceUpdateRequest.
Public Methods
public FenceUpdateRequest.Builder addFence (String key, AwarenessFence fence, PendingIntent pendingIntent)
This method is deprecated.
The Awareness API is deprecated and will be turned down in a future Google Play services
release, as early as January 2027. There is no direct replacement.
Adds a fence identified by the given key to get callbacks
to the pendingIntent when triggered. To get data from the returned Intent,
use the
FenceState.extract(Intent) utility method. If a fence with the given
key already exists, then this new fence will replace the existing one, and
any callbacks to a previous pending intent will cease.
Parameters
| key | The unique identifier for this fence, which can be used to either remove or replace the existing fence. |
|---|---|
| fence | The fence that is to be registered. |
| pendingIntent | The PendingIntent
that receives callbacks whenever the fence's state changes. Use the
FenceState.extract(Intent) method to get details about the fence that
was triggered. |
Returns
- This
FenceUpdateRequest.Builderobject.
public FenceUpdateRequest build ()
This method is deprecated.
The Awareness API is deprecated and will be turned down in a future Google Play services
release, as early as January 2027. There is no direct replacement.
Builds the fence update request.
Returns
- The
FenceUpdateRequestobject.
public FenceUpdateRequest.Builder removeFence (String key)
This method is deprecated.
The Awareness API is deprecated and will be turned down in a future Google Play services
release, as early as January 2027. There is no direct replacement.
Removes the fence with the given key.
Parameters
| key | the key that was passed into
addFence(String, AwarenessFence, PendingIntent) that identifies the
fence to remove. |
|---|
Returns
- This
FenceUpdateRequest.Builderobject.
public FenceUpdateRequest.Builder removeFence (PendingIntent pendingIntent)
This method is deprecated.
The Awareness API is deprecated and will be turned down in a future Google Play services
release, as early as January 2027. There is no direct replacement.
Removes all fences associated with the pendingIntent.
Parameters
| pendingIntent | The PendingIntent
that was passed into
addFence(String, AwarenessFence, PendingIntent). |
|---|
Returns
- This
FenceUpdateRequest.Builderobject.