我如何连接到 LocalOnlyHotspot (Android 8.x+)?
How do i connect to LocalOnlyHotspot (Android 8.x+)?
我已经成功地使用 LocalOnlyHotspot 创建了一个热点。
它给了我一个 SSID Android_share_xxxx 和未知密码的热点。
如何将我的其他设备连接到此热点?
我们可以通过以下方式获取生成的wifi配置:
@Override
public void onStarted(WifiManager.LocalOnlyHotspotReservation reservation) {
super.onStarted(reservation);
hotspotReservation = reservation;
currentConfig = hotspotReservation.getWifiConfiguration();
Log.v("DANG", "THE PASSWORD IS: "
+ currentConfig.preSharedKey
+ " \n SSID is : "
+ currentConfig.SSID);
hotspotDetailsDialog();
}
我已经成功地使用 LocalOnlyHotspot 创建了一个热点。 它给了我一个 SSID Android_share_xxxx 和未知密码的热点。 如何将我的其他设备连接到此热点?
我们可以通过以下方式获取生成的wifi配置:
@Override
public void onStarted(WifiManager.LocalOnlyHotspotReservation reservation) {
super.onStarted(reservation);
hotspotReservation = reservation;
currentConfig = hotspotReservation.getWifiConfiguration();
Log.v("DANG", "THE PASSWORD IS: "
+ currentConfig.preSharedKey
+ " \n SSID is : "
+ currentConfig.SSID);
hotspotDetailsDialog();
}