Modified the WifiP2pBroadcastReceiver didnot work problem. Add the receiver in the Android Manifest.xml