[英]In-App Browser - if the page is not loading - Display message
I am very new to Cordova
. 我对
Cordova
很Cordova
。 I am doing an application in Cordova
platform , in that I am opening a link using InAppbrowser
. 我正在
Cordova
平台上做一个应用程序,因为我正在使用InAppbrowser
打开一个链接。 I am trying to do a a approach like If the mobile phone INTERNET
speed is slow . 我正在尝试执行一种方法,例如“手机
INTERNET
速度慢”。 Then IN-app Browser page load is taking long time and its keep spinning for longer duration. 然后,应用程序内浏览器页面加载会花费很长时间,并且会持续旋转较长时间。 In-App Browser - if the page is not loading – I want to show some message like “server error image” .
应用内浏览器-如果页面未加载-我想显示一些消息,例如“服务器错误图像”。 Can anyone please help me to resolve this.
谁能帮我解决这个问题。 Thanks in Advance.
提前致谢。
I don't think InAppBrowser has an option for this. 我认为InAppBrowser对此没有选择。 But you can check for internet connection before opening the link.
但是您可以在打开链接之前检查互联网连接。 If there is no internet connection you can show a message to the user, like: "No Internet connection! Please check your connection and try again!"
如果没有互联网连接,则可以向用户显示一条消息,例如:“没有互联网连接!请检查您的连接,然后重试!”
if (navigator && navigator.onLine === false){
//show your warning message
}else{
//open your link using inappbrowser
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.