I am working with android wifi direct demo application. After installation in my device I noticed that it is not working as expected.
I am confused, does my device supp
In addition to StoneLam's answer, which is probably the most robust, a quicker-and-dirtier method would be to go ahead and call WifiP2pManager.discoverPeers() as you would if WiFi Direct were supported. The latter takes an ActionListener
with an onFailure()
callback. The failure reason passed to onFailure(int reason) can be P2P_UNSUPPORTED, which would answer your question: the device doesn't support WiFi Direct.
A call to onSuccess()
would mean the device does support WiFi Direct. A call to onFailure()
with other failure reasons would probably be inconclusive as to the device's capabilities.