连接Android / Java的蓝牙设备 [英] Connect to bluetooth device with Android/Java
问题描述
我试图做一个Android应用程序,将连接到我有我怀疑使用蓝牙频率的设备。但是,它似乎在 android.bluetooth
包中的所有构造函数是私有的。有没有人有他们可以与我分享的经验吗?
I'm trying to make an android app that will connect to a device that I have that I suspect uses bluetooth frequencies. However, it seems that all the constructors in the android.bluetooth
package are private. Does anyone have any experience they can share with me?
作为一个说明,是的,我已经看过了API。我想我知道干什么用的,但同样,我不能把任何任何类的构造函数。
As a note, yes I've already looked at the API. I think I know what to use, but, again, I can't call any of the constructors of any of the classes.
推荐答案
您拍摄于BluetoothChat例子仔细看提供的?这将告诉你如何扫描并连接到蓝牙设备,以及如何使用API来这样做。
http://developer.android.com/resources/samples/BluetoothChat/index.html
Have you taken a close look at the BluetoothChat example provided? This will show you how to scan for and connect to bluetooth devices as well as how to use the API to do so. http://developer.android.com/resources/samples/BluetoothChat/index.html
这篇关于连接Android / Java的蓝牙设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!