我正在开发一个使用 Nearby Connections API 的应用程序。连接和文件传输似乎在其他设备上运行良好,但我在使用三星 Galaxy S8 时发现了一些奇怪的行为。查看日志后,我发现此消息:
NearbyConnections: Computed the intersection of supported mediums with endpoint F77D. Between their supported mediums ([ WIFI_DIRECT WIFI_HOTSPOT BLE_L2CAP BLUETOOTH BLE ]) and my supported mediums ([ WIFI_HOTSPOT BLUETOOTH BLE NFC ]) we decided on the combined subset ([ WIFI_HOTSPOT BLUETOOTH BLE ]). [CONTEXT service_id=54 ]
重要的是my supported mediums ([ WIFI_HOTSPOT BLUETOOTH BLE NFC ])
,缺少WIFI_DIRECT
,这意味着我的 S8 无法通过 Wi-Fi Direct 与其他手机建立连接。这似乎很奇怪,因为我测试过的所有其他手机都支持 Wi-Fi Direct。这也很奇怪,因为我的 S8 能够使用 Wi-Fi Direct 执行不同的任务,正如设置中的 Wi-Fi Direct 界面截图所示。
附近连接无法在我的 S8 上使用 Wi-Fi Direct 是否有特殊原因?