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.