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