Android的蓝牙编程code样品 [英] Code samples for Android Bluetooth programming

查看:135
本文介绍了Android的蓝牙编程code样品的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新来的Andr​​oid。我在寻找一些code样品进行 Android的蓝牙编程。能否请您发表他们对我?任何有用的链接将是AP preciated。

I'm new to Android. I'm looking for some code samples for Android Bluetooth programming. Could you please post them for me? Any useful link would be appreciated.

推荐答案

我意识到这是一个古老的线程,但我想我会记一些笔记。 Android的蓝牙例子(已上市),有一堆的问题(而不是最重要的是你需要2 Android设备才能正常发挥作用)。

I realize this is an old thread, but I thought I'd jot some notes. The Android Bluetooth example (already listed) has a bunch of issues (not the least of which is you need 2 Android devices to get it to function).

看看这个例子在<一个href="http://luugiathuy.com/2011/02/android-java-bluetooth/">http://luugiathuy.com/2011/02/android-java-bluetooth/ 在那里,他是利用蓝牙在Android设备上打一个服务器(做一些机器人的工作)。

Take a look at the example at http://luugiathuy.com/2011/02/android-java-bluetooth/ where he is using BlueTooth on the Android device to hit a server (to do some robotics work).

请注意UUID问题(蓝牙决定哪些连接,它可以使在UUID的定义方式),并检查了 <一href="http://www.avetana-gmbh.de/avetana-gmbh/produkte/doc/javax/bluetooth/UUID.html">http://www.avetana-gmbh.de/avetana-gmbh/produkte/doc/javax/bluetooth/UUID.html

Be aware of UUID issues (the way that BlueTooth decides what connection it can make is defined in the UUID), and check out http://www.avetana-gmbh.de/avetana-gmbh/produkte/doc/javax/bluetooth/UUID.html

请记住,16位重新psented的UUID(即 0x1101 的串行端口)被误导的,其真正的最低显著的一部分,$ P $必须是codeD 0x00001101

Keep in mind that the 16 bits represented in the UUID (ie, 0x1101 for Serial Port) is misleading in that its really the least significant part and needs to be coded 0x00001101.

这篇关于Android的蓝牙编程code样品的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆