Hi,
my program establishes a connection to my PC using the Socket on the phone and AStreams. Works well and I can exchange data btw phone and PC.
Problem is: How do I detect when the connection gets interrupted and I need to reestablish the connection?
When I switch off the Wifi I get the messages "java.net.exception: Broken pipe" or ": Connection reset by peer", which are show on the screen.
How can I intercept that message and respond to it?
thanks a lot,
Johannes
my program establishes a connection to my PC using the Socket on the phone and AStreams. Works well and I can exchange data btw phone and PC.
Problem is: How do I detect when the connection gets interrupted and I need to reestablish the connection?
When I switch off the Wifi I get the messages "java.net.exception: Broken pipe" or ": Connection reset by peer", which are show on the screen.
How can I intercept that message and respond to it?
thanks a lot,
Johannes