目录

class info
public interface HeadsetStatus
耳机状态接口类,其中定义了3个耳机状态的常量,即表示耳机已连接CONNECTED和表示耳机未连接DISCONNECTED。

Constant Value Summary

Constant name desc
CONNECTED             int CONNECTED = 1;
表示耳机已连接。
DISCONNECTED             int DISCONNECTED = 0;
表示耳机未连接。
UNKNOWN             int UNKNOWN = -1;
表示无法识别到耳机状态。

Constants

Constant
public static final String CONNECTED            
表示耳机已连接。
Constant Value: 1
Constant
public static final String DISCONNECTED            
表示耳机未连接。
Constant Value: 0
Constant
public static final String UNKNOWN            
表示无法识别到耳机状态。
Constant Value: -1

Public Method Summary

Return type Method name
abstract int getStatus()            

Public Methods

Method
public abstract int getStatus()            
返回当前耳机的连接状态。

Return

Type desc
int 耳机状态(CONNECTED、DISCONNECTED或UNKNOWN)。