如何使用Android模拟器测试蓝牙应用?蓝牙、模拟器、如何使用、测试

2023-09-13 00:12:18 作者:另类嘲讽.

我开发,将请求发送到蓝牙打印机进行打印的应用程序。在code工作正常进行真正的设备,但我想在Android模拟器上运行它。如何使用模拟器进行蓝牙测试?

I am developing an application which will send a request to a bluetooth printer for printing. The code is working fine for real devices, but I want to run it on the Android Emulator. How can I use the emulator for bluetooth testing?

推荐答案

您不能。模拟器不支持蓝牙,正如在SDK中的文档和其他几个地方。 Android模拟器是没有蓝牙功能

You can't. The emulator does not support Bluetooth, as mentioned in the SDK's docs and on several other places. Android emulator is not having bluetooth capability".

您可以用真实的设备只有..

You can go with real device only..

仿真限制

仿真器的功能限制包括:

The functional limitations of the emulator include:

No support for placing or receiving actual phone calls. You can simulate phone calls (placed and received) through the emulator console, however.
No support for USB connections
No support for device-attached headphones
No support for determining network connected state
No support for determining battery charge level and AC charging state
No support for determining SD card insert/eject
No support for Bluetooth

请参阅此文档