wifidirectplugin 1.1.4 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -36,7 +36,13 @@ public class WifiDirectPlugin extends Plugin {
|
|
|
36
36
|
NetworkInfo networkInfo = intent.getParcelableExtra(WifiP2pManager.EXTRA_NETWORK_INFO);
|
|
37
37
|
if (networkInfo != null && networkInfo.isConnected()) {
|
|
38
38
|
Log.d(TAG, "Wi-Fi Direct connected");
|
|
39
|
-
|
|
39
|
+
manager.requestConnectionInfo(channel, wifiP2pInfo -> {
|
|
40
|
+
if(wifiP2pInfo.groupFormed && wifiP2pInfo.isGroupOwner) {
|
|
41
|
+
Log.d(TAG, "Group Owner IP: " + wifiP2pInfo.groupOwnerAddress.getHostAddress());
|
|
42
|
+
} else if (wifiP2pInfo.groupFormed) {
|
|
43
|
+
Log.d(TAG, "Client connected, Group Owner IP: " + wifiP2pInfo.groupOwnerAddress.getHostAddress());
|
|
44
|
+
}
|
|
45
|
+
});
|
|
40
46
|
// 필요한 경우 연결된 상태를 Flutter/Ionic에 전달하는 코드를 여기서 실행
|
|
41
47
|
// 예: call JavaScript 이벤트 전송 또는 콜백 호출
|
|
42
48
|
} else {
|