Morning,
I am using the following code in my Android app to load externally hosted web app This works fine and looks better than I expected (no webview nav buttons)
public class MainActivity extends DroidGap {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
super.loadUrl("http://www.external-url.com/webapp");
}
}
However, if the server is down or device has no internet connection, I get the ugly looking Android "Web Page not available" page. I want to avoid this by only calling the super.loadUrl
if the web page is available.
What is the most efficient way to do this?