How to use Bluetooth in Android emulator?

前端 未结 8 1978
醉梦人生
醉梦人生 2020-11-29 03:14

I want to create an application based on bluetooth operation in android.I am using the following code

 BluetoothAdapter adapter=BluetoothAdapter.getDefaultAd         


        
8条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-29 03:56

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

    And you already discovered this yourself: "the adapter is returning null value, which means the android emulator is not having bluetooth capability"

提交回复
热议问题