inappbrowser

Cordova InAppBrowser loaderror event not firing for Error 500

ⅰ亾dé卋堺 提交于 2019-12-11 13:16:37
问题 I have an issue with InAppBrowser. I am trying to catch errors that might come from the website I'm loading and I'm simulating this by a faulty .htaccess, which produces an error 500. I have the following code: ref = cordova.InAppBrowser.open($openuri, '_blank', 'location=no,toolbar=no,zoom=no,enableviewportscale=no,disallowoverscroll=no'); ref.addEventListener("loadstop",function() { ..... }); ref.addEventListener("loaderror",function() { alert('Toot'); }); ref.addEventListener('loadstart',

why does inAppBrowser open a blank new webview which i cant close

混江龙づ霸主 提交于 2019-12-11 12:54:05
问题 This happens only sometimes and other times works as expected. I am using inAppBrowser to open a url in a new webview. var ref = cordova.inAppBrowser.open(url, '_blank', _inAppBrowserArgs); ref.show(); my problem is that sometimes inAppBrowser opens a new webview and doesn't load the url (no loading indicator). I just get a blank screen. If the user clicks on "Done" and retries he/she gets the same result (doesn't work) and on each attempt a new blank webview is created (without closing the

Inappbrowser not displaying done button on ios with ionic

对着背影说爱祢 提交于 2019-12-11 12:52:49
问题 Having an issue with inappbrowser inside Ionic where the "Done" button does not appear on the page. It seems to be opening the page twice and after mucking about I have somehow caused it to open once in an app window then it will open another version in the browser with a return to app button, the return to app button however takes me back to the page with the pdf open with no Done button. At one point it would flash up what looked like the pdf with the done button then bring up another one

Cordova Inappbrowser multiple windows issue

扶醉桌前 提交于 2019-12-11 11:56:46
问题 I have a problem with Cordova Inappbrowser (phonegap). Example: var bot1, bot2; //windows function createb1(){ //create window1 bot1 = window.open(encodeURI("http://yandex.ru?b=1"), '_blank', 'hidden=yes'); bot1.val = "bot1"; bot1.addEventListener('loadstop', function(event) { //add listener console.log("B1 loadstop " + event.url); $.get("js/embed.js", function(data){ bot1.executeScript({code: data}); }); }); } function createb2(){ //create window 2 bot2 = window.open(encodeURI("http://yandex

InAppBrowser event.url always undefined

邮差的信 提交于 2019-12-11 11:16:45
问题 Do you have any idea why event.url always undefined? This is for loadstart and loadstop . The google page was displayed fine on pop up window. var ref = window.open('http://google.com', '_blank', 'location=yes'); ref.addEventListener('loadstart', function() { alert('start: ' + event.url); }); ref.addEventListener('loadstop', function() { alert('stop: ' + event.url); }); ref.addEventListener('exit', function() { alert(event.type); }); 回答1: var ref = window.open('http://google.com', '_blank',

Not able to attach event handler in Ionic 2 on InAppBrowser

百般思念 提交于 2019-12-11 09:26:52
问题 I'm very new to Ionic 2 framework and I'm trying to write an app in which I need to open an external URL in an embedded browser (InAppBrowser). I create an InAppBrowser instance and launch the browser. The browser opens and it also opens the link, but I keep getting an error. Cannot read property 'addEventListener' of undefined Here's the code that I'm using: let browser = new InAppBrowser( "http://www.google.com", "_blank", "location=no,hidden=yes", ); console.log(browser); browser.on(

Phonegap Build inAppBrowser event does not fire after view change in iOS 6 & 7

与世无争的帅哥 提交于 2019-12-11 07:58:03
问题 I am building a cross platform app using PhoneGap Build, version 3.3.0. The app is a news app, so requires updating of the DOM as different views are loaded. Every time this happens the old page is removed and replaced by the new view render. The app is built around backbone.js , using jQuery and Twig to render the views. I am using the inAppBrowser to handle links to external sites, and have successfully set these up, using: <gap:plugin name="org.apache.cordova.inappbrowser" /> in the config

ionic 2 - Inappbrowser event fire after second call

牧云@^-^@ 提交于 2019-12-11 05:56:31
问题 I use inappbrowser plugin in ionic 2 application like this : import {InAppBrowser} from 'ionic-native'; and use it like this : launch(url){ this.browser = new InAppBrowser( url, "_blank", "EnableViewPortScale=yes,closebuttoncaption=Done" ); this.browser.on("exit") .subscribe( () => { this.close_event=true; }, err => { console.log("InAppBrowser Loadstop Event Error: " + err); }); } and in html : <button ion-button icon-right color="danger" (click)="launch('https://www.example.com')">launch

Ionic: Intercept PDF URLs with cordova-plugin-inappbrowser

北战南征 提交于 2019-12-11 04:45:32
问题 I am building an Android/iOS Application with ionic 3, which simply consists of a webview by cordova-plugin-inappbrowser (version 3.0.0) and a responsive homepage. The homepage holds different links to websites as well as to (online) PDF files. As I've learned, the webview in Android (I haven't tried iOS, yet) does not support opening PDF files. That's why I wanted to intercept the called URLs, and open them in some other way, if they end on '.pdf': import { Component } from '@angular/core';

cordova InAppBrowser open remote page suport call native method?

人走茶凉 提交于 2019-12-11 04:18:39
问题 I met a problem when trying to open a remote page in cordova. I tried using the InAppBrowser plugin open remote page no call native method. I checked the official documentation. InAppBrowser does not allow access to local methods, but I need to implement this functionality. Can you help me get an insight of how can I do this or get an approach of it? 回答1: An emulation of the postMessage API has been added to cordova-plugin-inappbrowser for Android & iOS by this PR which enables you to post