android-hfpclient-电话功能

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;

accept_call

  • 0
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值