When one follows the guide for implementing WiFi direct from google doc here you need to use NetworkInfo .
The document is last updated: Last updated 2022-10-14 UTC.
NetworkInfo networkInfo = (NetworkInfo) intent.getParcelableExtra(WifiP2pManager.EXTRA_NETWORK_INFO);
Currently NetworkInfo is deprecated.
Does anyone know any way to get another object from intent which is not deprecated and it does same logic?
Or it's just google behaving like google
Also in WifiP2pManager they added a new method for api 33: addExternalApprover,
if anyone knows where it fits in the feature implementation, any hint is appreciated