java.lang.Object | |
↳ | com.google.android.gms.awareness.fence.FenceUpdateRequest.Builder |
Builder for a FenceUpdateRequest
.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Builder for a
FenceUpdateRequest . |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds a
fence identified by the given key to get
callbacks to the pendingIntent when triggered. | |||||||||||
Builds the fence update request.
| |||||||||||
Removes the fence with the given
key . | |||||||||||
Removes all fences associated with the
pendingIntent . |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
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 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 |
String :
The unique identifier for this fence, which can be used
to either remove or replace the existing fence. |
fence |
AwarenessFence :
The fence that is to be registered. |
pendingIntent |
PendingIntent :
The PendingIntent that receives
callbacks whenever the fence 's state changes. Use the
extract(Intent)
method to get details about the fence that was triggered. |
Returns | |
---|---|
FenceUpdateRequest.Builder |
This FenceUpdateRequest.Builder object.
|
Builds the fence update request.
Returns | |
---|---|
FenceUpdateRequest |
The FenceUpdateRequest object.
|
Removes the fence with the given key
.
Parameters | |
---|---|
key |
String :
the key that was passed into
addFence(String, AwarenessFence, PendingIntent) that
identifies the fence to remove. |
Returns | |
---|---|
FenceUpdateRequest.Builder |
This FenceUpdateRequest.Builder object.
|
Removes all fences associated with the pendingIntent
.
Parameters | |
---|---|
pendingIntent |
PendingIntent :
The PendingIntent that was passed into
addFence(String, AwarenessFence, PendingIntent) . |
Returns | |
---|---|
FenceUpdateRequest.Builder |
This FenceUpdateRequest.Builder object.
|