Search code examples
javaandroidbluetoothandroid-bluetoothbluecove

BlueCove library is not supported for Android


I connected to a Bluetooth device using the BlueCove library in a non-Android Java project. It works fine when testing on Windows, but when I test it on an Android device, I get the following error.

BlueCove com.intel.bluetooth.BluetoothStackBlueZ|com.intel.bluetooth.BluetoothStackBlueZDBus not available

I took the java project I prepared to test on the Android device as a jar file and integrated it into the other mobile project. As a result of my research on the internet, I saw that android devices do not support the BlueCove library. I learned that there is no common Bluetooth library in Android and non-Android Java. How do you think I can solve this problem?


Solution

  • Unfortunately, using Bluetooth from Java in a cross-platform way is pretty difficult. On Android it's straight forward as the library support is there but for Java on the desktop the libraries that have in the past been used have been dead for years. You will likely need to write platform specific code for each platform you want to support. It really should be part of the JDK but there's no sign of that happening at the moment.

    See Bluetooth (or the lack of) on Java for more details.