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

查看:583
本文介绍了如何从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的命令:plantronics特定命令,然后只有用户才能获得有关该命令的通知.

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天全站免登陆