recently I follow the steps given from Developer.Android.Com
But it seems i have a few luck over there. I tried to discover the available peers nearby, put \'em into
I guess you did't add PeerListListener to your activity. so it won't reply.
you can try to implement PeerListListener in your activity
public class Chat1Activity extends Activity implements WifiP2pManager.PeerListListener
and override onPeerAvailable method in your activity
@Override
public void onPeersAvailable(WifiP2pDeviceList peers) {
//put your code here
}
and change requestPeers method in your Receiver
if (mManager != null) {
mManager.requestPeers(mChannel, mActivity);
}
Hope this help!!
Have you check whether your device support Wifi Direct? Having a rom > 4.0 does not means it has wifi direct hardware support. Try to check that with PackageManager's API: http://developer.android.com/reference/android/content/pm/PackageManager.html#hasSystemFeature(java.lang.String)