public interface

HeadphoneState

com.google.android.gms.awareness.state.HeadphoneState

Class Overview

Headphone state.

Summary

Constants
int PLUGGED_IN Indicates that headphones are plugged into the physical headphone jack.
int UNPLUGGED Indicates that there are no headphones plugged into the physical headphone jack.
Public Methods
abstract int getState()
Returns the current state of the headphones.

Constants

public static final int PLUGGED_IN

Indicates that headphones are plugged into the physical headphone jack.

Constant Value: 1 (0x00000001)

public static final int UNPLUGGED

Indicates that there are no headphones plugged into the physical headphone jack.

Constant Value: 2 (0x00000002)

Public Methods

public abstract int getState ()

Returns the current state of the headphones.

Returns
int The headphone state, which is one of the values PLUGGED_IN or UNPLUGGED.