是否有可能一个蓝牙耳机和蓝牙车载套件之间的区别?蓝牙、有可能、套件、蓝牙耳机

2023-09-07 03:29:05 作者:说你贱你还真没让我失望

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

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()),这可以帮助你知道,如果对端设备是车载套件或没有(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)