Hi, Thanks for you response. yes I am making a call to requestConnectioInfo inside the WIFI_P2P_CONNECTION_CHANGED_ACTION notification.here is the code snippet for that
NetworkInfo networkInfo = (NetworkInfo) intent > .getParcelableExtra(WifiP2pManager. > EXTRA_NETWORK_INFO); > if (networkInfo.isConnected()) > { > // we are connected with the other device, request > connection > // info to find group owner IP > mManager.requestConnectionInfo(mChannel, mService); > //mService.requestGroupInfo(mService); > } but the fact is I am not getting any WIFI_P2P_CONNECTION_CHANGED_ACTION notification. On connect call back I am getting a success what does that means. dont think that means a connection is established .But everything works fine if i dont run Network service discovery on wifidirect. I have noted one more interesting fact that I I do a debug with putting break points in all wifidirect call backs mainly a breakpoint inside onPeersAvailable() it works fine. No idea what that implies? Thanks On Tuesday, October 23, 2012 5:59:02 PM UTC+1, Irfan Sheriff wrote: > > > > On Tue, Oct 23, 2012 at 9:38 AM, Zach <zachar...@gmail.com > <javascript:>>wrote: > >> Hi, >> >> I am working on wifi direct with network service discovery. Heres what I >> do for that >> >> For a Server(Device which first starts) >> >> 1. Initialize and Start Wifi Direct >> 2. Start a WifiDirect Group >> 3. Register a Local Service and Start service discovery >> >> >> For a client(All devices which starts after the first one) >> >> 1. Initialize and Start wifi direct >> 2. Check for Group owners, store details of group owner found >> 3. If found Register local service and start service discovery >> 4. When new device info is available via NSD, checks whether its the >> type of device expecting;add it to data structure >> 5. For all devices in data structure identify wifi direct group owner >> and establish a connection with it >> >> >> Things go wrong from here, after establishing a connection I am expecting >> a call back to onConnectionInfo available; but it never happens on client >> device. >> >> If I am not starting NSD everything works fine. I am getting a callback >> to onConnectionInfo available immediately after connecting with remote >> device(GO). >> > > wait, the callback to onConnectionInfo() comes only if you > requestConnectionInfo(). Do you mean you dont get a connection changed > broadcast ? Do you get peers changed broadcast which says what is going on > with various peers ? > > >> I was following this tutorial >> http://developer.android.com/training/connect-devices-wirelessly/nsd-wifi-direct.html >> >> Whats going wrong here? >> Many Thanks >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Android Developers" group. >> To post to this group, send email to >> android-d...@googlegroups.com<javascript:> >> To unsubscribe from this group, send email to >> android-developers+unsubscr...@googlegroups.com <javascript:> >> For more options, visit this group at >> http://groups.google.com/group/android-developers?hl=en > > > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en