Ken
Ken

Reputation: 31161

Android and HttpGet time out response chance

I have an instance of HttpGet, and I've set timeouts in HttpConnectionParams. My connection and request probably won't time out but they might and I'd like the chance to respond to this and some how inform the user of this event.

How/Where can I do this?

Upvotes: 0

Views: 725

Answers (1)

Nikolay Elenkov
Nikolay Elenkov

Reputation: 52956

A connection timeout would cause an ConnectTimeoutException, catch that and display a message. If you don't need to do anything specific, catching IOException might be good enough.

Upvotes: 1

Related Questions