Prasad
Prasad

Reputation: 3

How to detect BT headset in android

I refer code from this Link.

They have mentioned that only Android 3.0 and above support the BluetoothHeadset and BluetoothProfile classes.

Then how can we can detect the BT headsets using or whithout using that classes?

Upvotes: 0

Views: 374

Answers (1)

aleksikallio
aleksikallio

Reputation: 1932

You can detect the headset using the class android.bluetooth.BluetoothDevice, specifically getBluetoothClass(), which returns a BluetoothClass object. You can then call getDeviceClass() and compare it to the constants defined in BluetoothClass.Device.

These are available starting from API level 5 (Android 2.0).

Upvotes: 2

Related Questions