The documentation for Wifi Direct on the android developer site includes scraps of code taken from a now defunct sample application (Android Studio baulks at the project structure) that I managed to find a modified github version implemented in Kotlin that builds and runs however testing between two devices (Galaxy S8+: Android 10, Oppo Reno4: Android 12) failed to achieve anything useful (could not create a group or locate a peer on either device).
All SO discussions on the topic seem to be over a decade old so I'm left asking if the functionality does work anymore or if it has just rotted away on the Android source tree, is anybody able to direct me to some functional code or at least confirm the feature still works in later versions of the operating system? [or would I be better off explicitly configuring the devices using the hotspot feature?]
I was able to get the example app referred to (https://github.com/changfeng1050/WiFiDirectDemo) by adding the following to the
AndroidManifest.xml:https://github.com/realityexpander/WiFiDirectDemo