开发者

Android Bluetooth api capabilities

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜