E
E
eagamez2014-12-17 00:57:48
Android
eagamez, 2014-12-17 00:57:48

Web connection is not available how to replace it with your own?

hello, the problem is this, I wrote applications, everything seems to work ideally, I was just about to upload to the market, when the Internet turned off and when I went to any of the pages in the application I got a message that the Web connection is not available and you can immediately see the address of the site to which the program is trying to connect, how to replace this message with your own? help please, found a way out for webview

mWebView.setWebViewClient(new MyWebViewClient()
  {
    public void onReceivedError(WebView webview, int i, String s, String s1)
  {
      mWebView.loadUrl("file:///android_asset/error.html");
  }
   });
but my application is built on phonegap, how can I redo the code above or advise who knows what

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
smanioso, 2014-12-17
@smanioso

As I understand it, your application is a simple wrapper around a web application (that is, it can be opened through a regular browser). One solution in this case is to work with the sources that Phonegap / Cordova creates - you can edit them and paste the code that you provided in the question.

E
eagamez, 2014-12-18
@eagamez

help me edit, I don’t really want to install a webview so that the code fits

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question