java.lang.Object | |
↳ | com.google.android.gms.awareness.fence.HeadphoneFence |
Use this class to create headphone state fences.
Note: Values that indicate a changing state are momentarily TRUE
for
about 5 seconds, then automatically revert to FALSE
.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This fence is in the
TRUE state when the headphones are in the specified
state. | |||||||||||
This fence is momentarily (about 5 seconds) in the
TRUE state when
headphones are plugged in to the device. | |||||||||||
This fence is momentarily (about 5 seconds) in the
TRUE state when
headphones are unplugged from the device. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
This fence is in the TRUE
state when the headphones are in the specified
state.
Parameters | |
---|---|
headphoneState |
int :
Valid values are PLUGGED_IN
or UNPLUGGED |
Returns | |
---|---|
AwarenessFence |
AwarenessFence
|
This fence is momentarily (about 5 seconds) in the TRUE
state when
headphones are plugged in to the device.
Returns | |
---|---|
AwarenessFence |
AwarenessFence
|
This fence is momentarily (about 5 seconds) in the TRUE
state when
headphones are unplugged from the device.
Returns | |
---|---|
AwarenessFence |
AwarenessFence
|