[WIP] tried to implement a base for WiFi-Direct

This commit is contained in:
Faraphel 2024-03-27 22:28:05 +01:00
parent 17e99248e1
commit 4ede83c55c
2 changed files with 17 additions and 16 deletions

View file

@ -4,25 +4,14 @@
<value>
<entry key="app">
<State>
<targetSelectedWithDropDown>
<Target>
<type value="QUICK_BOOT_TARGET" />
<deviceKey>
<Key>
<type value="VIRTUAL_DEVICE_PATH" />
<value value="$USER_HOME$/.android/avd/Very_Small_API_34_2.avd" />
</Key>
</deviceKey>
</Target>
</targetSelectedWithDropDown>
<timeTargetWasSelectedWithDropDown value="2024-03-22T12:51:27.914541423Z" />
<multipleDevicesSelectedInDropDown value="true" />
<targetsSelectedWithDialog>
<Target>
<type value="QUICK_BOOT_TARGET" />
<deviceKey>
<Key>
<type value="VIRTUAL_DEVICE_PATH" />
<value value="$USER_HOME$/.android/avd/Micro_API_26.avd" />
<value value="C:\Users\RC606\.android\avd\Small_Phone_API_26.avd" />
</Key>
</deviceKey>
</Target>
@ -31,7 +20,7 @@
<deviceKey>
<Key>
<type value="VIRTUAL_DEVICE_PATH" />
<value value="$USER_HOME$/.android/avd/Very_Small_API_34_2.avd" />
<value value="C:\Users\RC606\.android\avd\Small_Phone_API_26_-_2.avd" />
</Key>
</deviceKey>
</Target>

View file

@ -28,6 +28,7 @@ class MainActivity : ComponentActivity() {
// ----- CONNECTION
/*
/*
val intentFilter = IntentFilter()
@ -56,6 +57,18 @@ class MainActivity : ComponentActivity() {
}
}
manager.createGroup(channel, object : ActionListener {
override fun onSuccess() {
Log.d("wifi-p2p", "Group created")
}
override fun onFailure(reason: Int) {
Log.e("wifi-p2p", "Error when creating group : $reason")
}
})
return
manager.requestGroupInfo(channel) { group ->
val config = WifiP2pConfig().apply {
this.deviceAddress = group.owner.deviceAddress
@ -107,7 +120,6 @@ class MainActivity : ComponentActivity() {
}
}
}
*/
}
}