Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/232.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何以编程方式在android 8.1及更高版本中获取蓝牙mac地址?_Android_Bluetooth_Mac Address_Programmatically - Fatal编程技术网

如何以编程方式在android 8.1及更高版本中获取蓝牙mac地址?

如何以编程方式在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中不再有效 有人对此问题有解决办法吗?如果有人有解决办法,我也面临同样的问题。请告诉我们。

我们有一个Android应用程序,需要通过蓝牙编程在两台设备之间建立连接

 String macAddress = android.provider.Settings.Secure.getString(getApplicationContext().getContentResolver(), "bluetooth_address");
然而,上述代码在Android Oreo和Pie中不再有效


有人对此问题有解决办法吗?

如果有人有解决办法,我也面临同样的问题。请告诉我们。