3

I recently started working on Network Service Discovery which is provided by Android.

I made a sample based on 'NSDChat'. Purpose of that sample is I will install that in two devices like one is Provider and another is Receiver. The provider will register itself once and will search for the devices which are registered by 'discovering' and will connect and send data to resolved device within its network. And from the Receiver device it will just register and wait for the Providers connection to receive the data. The sample is working fine that means whenever I started app in two devices then Provider and Receivers are registering and after that Provider able to discover the Receiver and sending data and also receiving response from it.

I am just iterating this process continuously means once Receiver receives the data then again Provider will discover that and send data to that Receiver.

My problem is the entire process is working fine continuously but after 20 mins or 30 mins Provider was not discovering and resolving the Receiver. And even not throwing any exception in log like discover failed or something. I tried by re-starting the application, re-starting the device even no luck.

At last I found a work around like uninstalling the app restarting the devices and re-installing the app and start. But I cannot implement functionality with this work around.

If anyone give a solution for this will be great for me.

  • 1
    Did you ever figure this out? I have been having the same issue for a while now. – levibostian Jun 30 '15 at 20:04
  • I'm having the same issue. I've tested 4 different devices, two running 4.4, two running 5.1. On the 4.4 devices, I can't recover until a reboot of the device. Is this a known issue? Can anyone run discovery for more than 30 minutes? – proximous Sep 29 '15 at 17:35
  • 1
    Further testing shows that the problem may be only with 4.4 since it always fails in 20 minutes on 4.4. I now think my failures on 5.1 are unrelated since I no longer see failures on 5.1. For me, discovery continues to work. The problem is around the 20 minute mark, all resolves fail with "ALREADY ACTIVE". – proximous Sep 30 '15 at 16:44

0 Answers0