WiFi_P2P_PEERS_CHANGED not broadcasting after discoverPeers method

80 Views Asked by At

I followed almost exactly the Google Tutorial here https://developer.android.com/guide/topics/connectivity/wifip2p.html up to the Discovering Peers section (with the only change being that I put mChannel as an input param for the discoverPeers method as a variable named 'channel' wasn't created), and I find that onSuccess gets called but no broadcast is sent to the receiver.

I assume the receiver is initialised as it broadcasts WIFI_P2P_STATE_CHANGED_ACTION where I was also able to check that my device is WiFi P2P enabled (I'm using a Oneplus 3 running on Android Nougat) as well as WIFI_P2P_CONNECTION_CHANGED_ACTION and WIFI_P2P_THIS_DEVICE_CHANGED_ACTION.

Help is much appreciated!

0

There are 0 best solutions below