如何以编程方式在android 8.1及更高版本中获取蓝牙mac地址?
我们有一个Android应用程序,需要通过蓝牙编程在两台设备之间建立连接如何以编程方式在android 8.1及更高版本中获取蓝牙mac地址?,android,bluetooth,mac-address,programmatically,Android,Bluetooth,Mac Address,Programmatically,我们有一个Android应用程序,需要通过蓝牙编程在两台设备之间建立连接 String macAddress = android.provider.Settings.Secure.getString(getApplicationContext().getContentResolver(), "bluetooth_address"); 然而,上述代码在Android Oreo和Pie中不再有效 有人对此问题有解决办法吗?如果有人有解决办法,我也面临同样的问题。请告诉我们。
String macAddress = android.provider.Settings.Secure.getString(getApplicationContext().getContentResolver(), "bluetooth_address");
然而,上述代码在Android Oreo和Pie中不再有效
有人对此问题有解决办法吗?如果有人有解决办法,我也面临同样的问题。请告诉我们。