HeadsetClientService:
connect –连接
电话操作和状态
bluedroid 对应的电话操作
typedef enum {
BTHF_CLIENT_CALL_ACTION_CHLD_0 = 0,//held call release
Releases all held calls or sets User Determined User Busy (UDUB) for a waiting call
BTHF_CLIENT_CALL_ACTION_CHLD_1,// accept and release call
Releases all active calls (if any exist) and accepts the other (held or waiting) call
BTHF_CLIENT_CALL_ACTION_CHLD_2,//accept and hold call
Places all active calls (if any exist) on hold and accepts the other (held or waiting) call.
BTHF_CLIENT_CALL_ACTION_CHLD_3,// Adds a held call to the conversation
BTHF_CLIENT_CALL_ACTION_CHLD_4, Connects the two calls and disconnects the subscriber from both calls (Explicit Call Transfer). Support for this value and its associated functionality is optional for the HF.
- Where both a held and a waiting call exist, the above procedures shall apply to the waiting call (i.e., not to the held call) in conflicting situation.
BTHF_CLIENT_CALL_ACTION_CHLD_1x,// release a specific active call
BTHF_CLIENT_CALL_ACTION_CHLD_2x,// Request private consultation mode with specified call (<idx>). (Place all calls on hold EXCEPT the call indicated by <idx>.)
BTHF_CLIENT_CALL_ACTION_ATA,//accept call
BTHF_CLIENT_CALL_ACTION_CHUP,// hang up call
AT+BTRH (Bluetooth Response and Hold Feature)
Syntax:
AT+BTRH=<n> (Set command)
BTHF_CLIENT_CALL_ACTION_BTRH_0,
BTHF_CLIENT_CALL_ACTION_BTRH_1,
BTHF_CLIENT_CALL_ACTION_BTRH_2,
<n>: 0, 1, 2 entered as integer values, where
0 = Put Incoming call on hold
1 = Accept a held incoming call
2 = Reject a held incoming call
} bthf_client_call_action_t;
BluetoothHeadsetClientCall—电话状态
/* Call state */
/**
* Call is active.
*/
public static final int CALL_STATE_ACTIVE = 0;
/**
* Call is in held state.
*/
public static final int CALL_STATE_HELD = 1;
/**
* Outgoing call that is being dialed right now.
*/
public static final int CALL_STATE_DIALING = 2;
/**
* Outgoing call that remote party has already been alerted about.
*/
public static final int CALL_STATE_ALERTING = 3;
/**
* Incoming call that can be accepted or rejected.
*/
public static final int CALL_STATE_INCOMING = 4;
/**
* Waiting call state when there is already an active call.
*/
public static final int CALL_STATE_WAITING = 5;
/**
* Call that has been held by response and hold
* (see Bluetooth specification for further references).
*/
public static final int CALL_STATE_HELD_BY_RESPONSE_AND_HOLD = 6;
/**
* Call that has been already terminated and should not be referenced as a valid call.
*/
public static final int CALL_STATE_TERMINATED = 7;