I have an application which communictates with a webservice via an URLConnection.
When I start my app, then switch from/to wifi or mobile network. The getInputStream() method throws either a FileNotFoundException on mobile network, or a SocketException on wifi.
Everytime I make a request to the webservice I create a new URLConnection, so it doen't stay open while switching.
Is there a way to solve this?
Thanks in advance,
Id.
When I start my app, then switch from/to wifi or mobile network. The getInputStream() method throws either a FileNotFoundException on mobile network, or a SocketException on wifi.
Everytime I make a request to the webservice I create a new URLConnection, so it doen't stay open while switching.
Is there a way to solve this?
Thanks in advance,
Id.