Change error image in Cordova

android cordova

23 观看


18 作者的声誉

I am using Cordova and InAppBrowser plugin to see external links in my app(android). But when device doesn't have connection and I am trying to go for external link it shows Android error(see image).

Question: How to change this standard error page (standard error image) to my custom error page?

Thanks a lot

作者: Illia Chilikin 的来源 发布者: 2017 年 12 月 27 日

回应 1


552 作者的声誉


Use like this :

document.addEventListener("deviceready", onDeviceReady, false);
        function onDeviceReady() {
             if(navigator.onLine) {
                  var ref ='', '_blank', 'location=yes');
                  } else {
                   //create page in folder www like index2.html and include 
                      alert("No Internet Pleas active your internet");
                      window.location = "index2.html";

作者: Younes Zaidi 发布者: 2017 年 12 月 27 日