如何在 Android 中处理来自蓝牙耳机的 AT 命令? [英] How to handle AT commands from a Bluetooth headset in Android?

查看:73
本文介绍了如何在 Android 中处理来自蓝牙耳机的 AT 命令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想处理来自标准蓝牙单声道耳机的 AT 命令(用于双击事件).默认情况下,双击向话机发送 AT+BLDN 命令(重拨事件).根据 Android 文档,为

I would like to handle an AT command (for double tap event) from a standard Bluetooth mono headset. By default, the double tap sends AT+BLDN command (Redial event) to the phone. According to Android documentation, registering a Broadcast Receiver for

android.bluetooth.headset.action.VENDOR_SPECIFIC_HEADSET_EVENT

android.bluetooth.headset.action.VENDOR_SPECIFIC_HEADSET_EVENT

将处理所有此类供应商相关的 AT 命令.但是,当耳机发送 AT 命令时,它不会被调用.但是,重拨事件发生在电话上.

will handle all such vendor related AT commands. But, it is not being invoked when the AT command is sent by the headset. Though, the redial event happens on the phone.

推荐答案

AT+BLDN 是用于重拨的标准 (GSM) 命令.所以它由系统本身处理.此外,根据我的理解,设备应该支持那些用于 ex:pla​​ntronics 特定命令的特定命令,然后只有用户才能获得有关该命令的通知.

AT+BLDN is a standard(GSM) command for redialing. So it is handled by the system itself.Moreover as per my understanding the device should support those specific commands which are for ex:plantronics specific command then only user will be able to get notification about that command.

这篇关于如何在 Android 中处理来自蓝牙耳机的 AT 命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆