我升级到Android 6,使用蓝牙的应用程序无法使用这个新的API版本.这与Play商店中的应用程序存在同样的问题:蓝牙spp工具专业版(如果蓝牙工作则可以查看的良好应用程序),它不会发现设备.
问题似乎出现在蓝牙发现中:
BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
mBluetoothAdapter.startDiscovery()
Log.i("BLUETOOTH", String.valueOf(mBluetoothAdapter.isDiscovering())); // Return false
Run Code Online (Sandbox Code Playgroud)
我的应用程序适用于Android 4/5,我遵循:http://developer.android.com/guide/topics/connectivity/bluetooth.html