问题描述
我想现在用下面的code基于在android.I蓝牙操作创建一个应用程序
I want to create an application based on bluetooth operation in android.I am using the following code
BluetoothAdapter adapter=BluetoothAdapter.getDefaultAdapter();
适配器返回空值,这意味着Android模拟器是不是有蓝牙功能。我使用了Android 2.1的android.Anybody知道如何使用来自Android模拟器蓝牙的最新版本,请帮助我。
the adapter is returning null value, which means the android emulator is not having bluetooth capability. i am using android 2.1 the latest version of android.Anybody knows how to use the bluetooth from android emulator, please help me.
推荐答案
您不能。模拟器不支持蓝牙,正如在SDK中的文档和其他几个地方。
You can't. The emulator does not support Bluetooth, as mentioned in the SDK's docs and on several other places.
和你已经发现了这个自己:适配器返回空值,这意味着Android模拟器是不是有蓝牙功能
And you already discovered this yourself: "the adapter is returning null value, which means the android emulator is not having bluetooth capability"
这篇关于如何在Android模拟器使用蓝牙?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!