是否有可能一个蓝牙耳机和蓝牙车载套件之间的区别? [英] Is it possible to distinguish between a bluetooth headset and bluetooth car kit?

查看:368
本文介绍了是否有可能一个蓝牙耳机和蓝牙车载套件之间的区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题是这样的:是否有可能知道,如果一个用户正在使用蓝牙车载套件,而不是耳机?我只是想,如果用户是在车载套件的某些功能工作。这可能吗?

My problem is this: "Is it possible to know if a user is using a bluetooth car kit rather than a headset?" I only want certain features to work if the user is on a car kit. Is this possible?

非常感谢。

推荐答案

尝试使用设备类(的 http://developer.android.com/reference/android/bluetooth/BluetoothClass.html (使用方法getDeviceClass()和getMajorDeviceClass()),这可以帮助你知道,如果对端设备是车载套件或没有(<一个href=\"http://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#AUDIO_VIDEO_CAR_AUDIO\" rel=\"nofollow\">http://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#AUDIO_VIDEO_CAR_AUDIO)

Try using device class (http://developer.android.com/reference/android/bluetooth/BluetoothClass.html( use method getDeviceClass() and getMajorDeviceClass()), this can help you to know if the peer device is a carkit or not(http://developer.android.com/reference/android/bluetooth/BluetoothClass.Device.html#AUDIO_VIDEO_CAR_AUDIO)

这篇关于是否有可能一个蓝牙耳机和蓝牙车载套件之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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