外周支持Android-L示例。

时间:2021-11-28 19:02:44

I would appreciate an example of BLE peripheral mode for Android-L.

我想要一个关于Android-L的外围模式的例子。

The code that I have gives me strange errors (i.e too many advertisers) which makes no sense as there are no advertisers that i can see from scanner like Lightblue on ios.

我给我的代码有奇怪的错误(我。e太多的广告客户)这是毫无意义的,因为在ios中,我可以从扫描仪上看到像Lightblue这样的广告客户。

3 个解决方案

#1


3  

It seems that there is a bug for Android-L preview for Nexus 7. Nexus 5 works fine https://code.google.com/p/android-developer-preview/issues/detail?id=589

Nexus 7的Android-L预览版似乎有一个缺陷。Nexus 5使用的是很好的https://code.google.com/p/android- development - preview/addrees/detail? id=589。

Example code for nexus 5 can be found here https://github.com/geoaxis/BluetoothTest

nexus 5的示例代码可以在这里找到https://github.com/geoaxis/BluetoothTest。

#2


3  

https://github.com/geoaxis/BluetoothTest works on my nexus 5 running L.

https://github.com/geoaxis/BluetoothTest在我的nexus 5上运行L。

At first when initializing advertising I was getting: public static final int ADVERTISE_FAILED_CONTROLLER_FAILURE

在初始化广告的时候,我得到的是:公共静态final int advertising . failed_controller_failure。

Operation fails due to bluetooth controller failure.

由于蓝牙控制器故障,操作失败。

Constant Value: 5 (0x00000005)

恒定值:5(0 x00000005)

I was running other bluetooth apps, I killed all of them, restarted the bluetooth service and got a success. L is still preview, so some loose ends are expected.

我正在运行其他的蓝牙应用程序,我杀了他们所有人,重启蓝牙服务并取得了成功。我还在预览,所以预计会有一些问题。

geoaxis, thanks for forking, I wouldn't have had the chance to read this very clear sample otherwise; there should such a sample in the L dev preview samples.

geoaxis,谢谢你的forking,我不会有机会阅读这个非常清楚的样本,否则;在L dev预览样本中应该有这样一个样本。

cheers

干杯

#3


0  

BLE peripheral mode for Android is expected in android version 4.5

Android版本4.5中预计Android的外围模式为BLE。

#1


3  

It seems that there is a bug for Android-L preview for Nexus 7. Nexus 5 works fine https://code.google.com/p/android-developer-preview/issues/detail?id=589

Nexus 7的Android-L预览版似乎有一个缺陷。Nexus 5使用的是很好的https://code.google.com/p/android- development - preview/addrees/detail? id=589。

Example code for nexus 5 can be found here https://github.com/geoaxis/BluetoothTest

nexus 5的示例代码可以在这里找到https://github.com/geoaxis/BluetoothTest。

#2


3  

https://github.com/geoaxis/BluetoothTest works on my nexus 5 running L.

https://github.com/geoaxis/BluetoothTest在我的nexus 5上运行L。

At first when initializing advertising I was getting: public static final int ADVERTISE_FAILED_CONTROLLER_FAILURE

在初始化广告的时候,我得到的是:公共静态final int advertising . failed_controller_failure。

Operation fails due to bluetooth controller failure.

由于蓝牙控制器故障,操作失败。

Constant Value: 5 (0x00000005)

恒定值:5(0 x00000005)

I was running other bluetooth apps, I killed all of them, restarted the bluetooth service and got a success. L is still preview, so some loose ends are expected.

我正在运行其他的蓝牙应用程序,我杀了他们所有人,重启蓝牙服务并取得了成功。我还在预览,所以预计会有一些问题。

geoaxis, thanks for forking, I wouldn't have had the chance to read this very clear sample otherwise; there should such a sample in the L dev preview samples.

geoaxis,谢谢你的forking,我不会有机会阅读这个非常清楚的样本,否则;在L dev预览样本中应该有这样一个样本。

cheers

干杯

#3


0  

BLE peripheral mode for Android is expected in android version 4.5

Android版本4.5中预计Android的外围模式为BLE。