Android的蓝牙连接到嵌入式设备蓝牙、连接到、嵌入式、设备

由网友(活在回忆里)分享简介:我创建的应用程序中,我不得不数据通过嵌入式设备发送到手机上。i am creating app in which i had to send data to phone via embedded device.是否有可能通过嵌入式设备发送文件到Android手机与蓝牙?is it possible to send...

我创建的应用程序中,我不得不数据通过嵌入式设备发送到手机上。

i am creating app in which i had to send data to phone via embedded device.

是否有可能通过嵌入式设备发送文件到Android手机与蓝牙?

is it possible to send file via embedded device to android phone with bluetooth?

我没有找到任何的例子吧,我想我需要另一种嵌入式设备,如加密狗实现OBEX协议。

i dont find any of example of it and i think i need another embedded device like dongle for implementing obex protocol.

如果任何人都做到了B4请帮助我。

if anyone have done it b4 pls help me.

推荐答案

您需要阅读在正在提交的设备中的文件的字节数。样品code连接的机器人到一个单独的设备可以在此SO帖子。还有一个API的健壮文档以及一个特定< A HREF =htt​​p://developer.android.com/resources/samples/BluetoothChat/index.html相对=nofollow>示例应用程序。要知道,很多人都在使用示例应用程序,试图android的连接到单独的设备时发现的问题。这个问题在此 SO后(见接受的答案),但本质上是连接问题是通过调用 listenUsingRfcommWithServiceRecord 引起的。

You need to read in the bytes of the file that is being submitted by your device. Sample code that connects the android to a separate device can be found in this SO post. There is also a robust documentation of the API as well as a specific sample application. Be aware that many people are finding issues when using the sample application to try and connect the android to a separate device. The issue is explained in this SO post (see the accepted answer), but essentially the connectivity problem is caused by calling listenUsingRfcommWithServiceRecord.

我自己碰到的问题有蓝牙,但使用上述资源已经能够非常成功地与一个嵌入式设备连接我的机器人。希望此聚集的信息将是你有帮助。

I myself ran into problems with Bluetooth, but using the above resources have been able to quite successfully connect my android with an embedded device. Hopefully this aggregate of information will be of use to you.

阅读全文

相关推荐

最新文章