获取设备的蓝牙MAC地址

时间:2020-05-28 20:31:14

标签: android ios xamarin bluetooth

我需要使用其蓝牙MAC地址或UUID自我识别设备。似乎无法在Xamarin,Android或iOS中获取设备的MAC或UUID。有什么办法吗?我尝试使用以下语句:

    macAddress = Settings.Secure.getString(mContext.getContentResolver(), "bluetooth_address"); 

但是这不起作用并且重新运行null,我检查了Secure后面的代码,实际上没有bluetooth_address。我使用了相同的代码,并且很容易就获得了安全代码中的bluetooth_on,因此我确定代码可以正常工作,但是没有任何bluetooth_address。

有人知道我该怎么做吗?如果我做不到这一点,则必须更改整个设计。

最佳

0 个答案:

没有答案