我们有一个 Android 应用程序,我们需要以编程方式通过蓝牙在 2 个设备之间建立连接。
String macAddress = android.provider.Settings.Secure.getString(getApplicationContext().getContentResolver(), "bluetooth_address");
Run Code Online (Sandbox Code Playgroud)
但是,上述代码在 Android Oreo 和 Pie 中不再起作用。
有人有解决此问题的方法吗?