HeadphoneState

  • HeadphoneState indicates whether headphones are plugged in or unplugged.

  • The PLUGGED_IN constant indicates headphones are plugged into the physical jack.

  • The UNPLUGGED constant indicates no headphones are plugged into the physical jack.

  • The getState method returns the current state of the headphones as either PLUGGED_IN or UNPLUGGED.

public interface HeadphoneState

Headphone state.

Constant Summary

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 Method Summary

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

public static final int UNPLUGGED

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

Constant Value: 2

Public Methods

public abstract int getState ()

Returns the current state of the headphones.

Returns