This code doesn\'t work:
URL url = new URL( xmlPath );
InputSource input = new InputSource( url.openStream() );
all the time, res
In my case the problem was elsewhere. I had to:
add
setup a proxy server on my emulator : Emulator > settings > wireless and network > Mobile Networks > Access Point Name > "the access point you have ;)". Here you can set all the proxy port url and login/pass you want.
AND
I found the solution here:
HTTP doesn't work in Android emulator
" This exception is there for a reason. Network activity can take time, performing networking on the main thread, which is the same thread that responsible for updating the UI, would freeze the thread until the networking is done (this is what happens on every thread, but when it's performed on a dedicated thread, it's ok). In Android, if the UI-thread isn't active for 5 seconds, it will show the Application is not responsive, Do you want to close it? dialog. "