HeadphoneFence
Stay organized with collections
Save and categorize content based on your preferences.
Use this class to create headphone state fences.
Note: Values that indicate a changing state are momentarilyTRUE
for about 5 seconds, then automatically revert toFALSE
.
Please be sure to follow the guidelines in theAwareness API Guide.
Public Method Summary
staticAwarenessFence
|
during(int headphoneState)
This fence is in the
TRUE state when the headphones are in the specified state.
|
staticAwarenessFence
|
pluggingIn()
This fence is momentarily (about 5 seconds) in the
TRUE state when headphones are plugged in to the device.
|
staticAwarenessFence
|
unplugging()
This fence is momentarily (about 5 seconds) in the
TRUE state when headphones are unplugged from the device.
|
Inherited Method Summary
From class java.lang.Object
Object
|
clone()
|
boolean |
|
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()
|
Public Methods
public staticAwarenessFence
during(int
headphoneState)
This fence is in theTRUE
state when the headphones are in the specified state.
This fence is momentarily (about 5 seconds) in theTRUE
state when headphones are plugged in to the device.
This fence is momentarily (about 5 seconds) in theTRUE
state when headphones are unplugged from the device.
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 2017-09-19 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label": "Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label": "Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label": "Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label": "Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label": "Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label": "Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label": "Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label": "Other"
}]