How to handle a down webview page?

Put your problem here if it does not fit any of the other categories.

How to handle a down webview page?

Postby Sambo » Tue Jun 01, 2010 10:35 pm

Part of my app uses a webview which it is dependent upon to deliver the full user experience. Although I have a reliable host (media temple) for my webview pages from time to time they do go down. I would like to display a polite message to users "be back shortly..." what would be the best way to handle this from the App side?
Junior Developer
Junior Developer
Posts: 14
Joined: Mon May 17, 2010 12:49 am
Location: Seattle, WA


Re: How to handle a down webview page?

Postby vengeance_mj » Wed Jun 02, 2010 3:16 am

You can check the response code of the HttpURLConnection object.

Here is a list of response codes from the Android documentation :
Code: Select all
# 1xx: Informational
# 2xx: Success
# 3xx: Relocation/Redirection
# 4xx: Client Error
# 5xx: Server Error
Senior Developer
Senior Developer
Posts: 174
Joined: Thu Oct 29, 2009 2:32 am


Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 5 guests