android-ssdp
android-ssdp copied to clipboard
The socket should be set to a specific timeout
The socket maybe blocking, so a timeout should be set on that socket. Otherwise due to the background thread is running sequentially, the other async task in the same activity will be blocked.
Thanks for the clue...
I even didn't know this!
Beside what you told I have found another work around:
instead of using discover.execute();
I have used discover.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
This way they AsyncTasks won't block each other.