开发者

Android Bluetooth api capabilities

开发者 https://www.devze.com 2023-01-04 19:08 出处:网络
I am working with sensor devices that transmit data via bluetooth. I am using HTC desire which runs on android 2.1 platform to pair it with the sensors. I want to find out a few things about the senso

I am working with sensor devices that transmit data via bluetooth. I am using HTC desire which runs on android 2.1 platform to pair it with the sensors. I want to find out a few things about the sensor device such as its bluetooth version, what bluetooth profile it supports and its blu开发者_C百科etooth class. My question is, is android bt api capable of extracting such information from the sensor devices. If not can you recommend any other way to get such information.


Yes, initiate a discovery on your HTC and get the BluetoothDevice of your sensor (put a listener on BluetoothDevice.ACTION_FOUND). Then when your phone discovers the remote device do: BluetoothClass btClass = btDevice.getBluetoothClass();

btClass should have everything you need.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号