0

Hi ..

we have a anddroid app which is connected to a server url ..som thing like we have used iframe kind of thing

and when ever a user with out internet connection opens it it is showing a a normal 404 page like http://www.soandso.com/app is not available ..

i dont want the url to be displayed and i want to show a custom page just like fb does with a antenna symbol

any help is appreciable

3
Contributors
4
Replies
8
Views
4 Years
Discussion Span
Last Post by peter_budo
0

Open the connection yourself, see if it's a 404, if it is, use your own html, if it's not, display the given html.

0

it is not eactly 404 ..but where is no connectivity it is showing not found error

0

I'm not sure about the specifics of the android C API for network connections, but there should be a handler for it somwhere. Try to make a TCP connection, and if it fails, display your error page. Else, continue as normal.

0

What ever library you use it will have something similar to default Android implementation of HttpResponse.getStatusLine()link from which you get StatusLine and here you can get actual code value. This is often in libraries simplyfied to something like HttpResponse.getStatusCode or similar

So all you have to do is fire your HttpRequest, wait for HttpResponse, then evaluate for what ever error messages you want.

Edited by peter_budo

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.