inappbrowser

InAppBrowser executeScript callback not firing at all

杀马特。学长 韩版系。学妹 提交于 2019-12-21 05:16:15
问题 I am creating building a Hybrid application using Ionic with ngCordova. In the application login workflow I am returning a page from server to the InAppBrowser plug-in. I need to read some values from the returned page in my Ionic app. The usual way would be to call executeScript on 'loadstop' event, and setup a call back when that script returns something. And I have that setup as you can see in the following code. However, no matter what I try, iOS Emulator, Android Emulator the callback is

How to pause YouTube video on InAppBrowser when my Cordova app goes to background?

元气小坏坏 提交于 2019-12-20 01:46:04
问题 I am developing an Android app using Cordova and Ionic framework. I am playing a YouTube video with InAppBrowser using the code below: window.open('https://www.youtube.com/embed/rAiw2SXPS-4', '_self'); But when I press the home button on the device while playing the video, the video is not paused. Due to this issue, my app is rejected after submitting to Google Play with the reason below: Your submission has been rejected for enabling background playing of YouTube videos in violation of the

Is there any way to force a link to open in Chrome from Facebook's in-app browser?

邮差的信 提交于 2019-12-19 05:48:06
问题 I've got a web app that requires the ability to print. Facebook's in-app implementation of Chrome doesn't allow printing. Currently, I'm giving the user instructions on how to open in chrome themselves in place of the print button I give normal users. But I'd prefer to just open Chrome for them when they get to that page, or at the very least provide a button/link that would open the page in Chrome instead of forcing them to find the settings button and figure out how to open Chrome

Handle Android Back Button on Phonegap InAppBrowser

倾然丶 夕夏残阳落幕 提交于 2019-12-17 19:28:40
问题 I would like to disable or override the Android Back button while I am navigating pages on the InAppBrowser. Can I add an event listener that can handle that? EDIT: Looking at the answer by @T_D below the solutions provided are the closest I could get to. It does not seem to be possible to override the button in InAppBrowser as all the PhoneGap tweaks stop working while navigating pages on this plugin. I was not able to find any other solution rather than modifying the API library. If there

External links in phonegap app do not open well

旧时模样 提交于 2019-12-17 15:35:47
问题 So I have a phonegap project with Phonegap 2.9.0 and building with PhonegapBuild. I got external links in my app, that I would like to open inapp or using the default device browser outside of my app. I am ok for both solutions. Today my app open links inapp but it goes fullscreen, no zoom possible, and no button to come back in the app... I am trying to figure out a solution for days, and looking at the same kind of questions here but nothing work good. Could somebody explain clearly what is

Cordova, why would InAppBrowser plugin be required to open links in system browser

会有一股神秘感。 提交于 2019-12-17 06:11:25
问题 I have a Cordova app, it is a single page application with a single HTML file. All links should open in the system browser. I don't want an "embedded" InAppBrowser but really the native system / external browser. Everywhere we can find example of code using InAppBrowser with something like: window.open('http://apache.org', '_system'); But why do we need to install InAppBrowser, even if we don't even plan to use an embedded browser? Can someone really expain what is supposed to be the behavior

How do I run a function cordova if the command embedded in external sites?

两盒软妹~` 提交于 2019-12-14 03:21:54
问题 I want to run a function to open the link in the android browser system. Here is an illustration of my questions. See the illustration What should I do? I only use javascript not java. Please help 回答1: Some time ago I encountered the same problem. To do this I modified the InAppBrowser source code. you should override the shouldOverrideUrlLoading method in the InAppBrowserClient class found in InAppBrowser.java This will allow you to hook in to the request before the url is being loaded and

InAppBrowser not being called in Phonegap 3.1.0

混江龙づ霸主 提交于 2019-12-13 12:14:29
问题 I've grabbed the latest version of phonegap from NPM and installed it. I created a new project and added the InAppBrowser plugin per the docs on the PhoneGap . I then make a JavaScript call from my webapp but I never see the alert I have coded below nor do I see it with any breakpoints I have setup in Xcode for the plugin. Here's the code for the JS: var pdfViewer = { loadPdf: function(record, successCallback, errorCallback) { var filename = record.get('building') + "-" + record.get('floor')

Cordova InAppBrowser is blank on iPad iOS 10

雨燕双飞 提交于 2019-12-13 06:29:38
问题 This issue happens only on iPad with iOS 10. When I try to use InAppBrowser with presentationstyle set to fullscreen , it pops up fine but when I tap on the Done button, I got a blank screen. Looks like it doesn't destroy itself properly. I am using Cordova 6.4.0 and InAppBrowser plugin 1.6.1 回答1: Not sure if this is applicable to you but I was also having an issue with a blank screen after tapping the Done button, but it was only happening in landscape. Still worth a shot though: cordova

Timed popup with PhoneGap/Cordova InAppBrowser?

二次信任 提交于 2019-12-13 04:34:50
问题 I'm using PhoneGap (Apache Cordova) with the InAppBrowser plugin (cordova-plugin-inappbrowser). In order to display a popup window, I'm using the following function: function popup(url) { var win = cordova.InAppBrowser.open(url, "_blank", "location=no"); win.addEventListener("loadstop", function() { var loop = window.setInterval(function() { win.executeScript( {code: "window.shouldClose"}, function(values) { if(values[0]) { win.close(); window.clearInterval(loop); } } ); }, 200); }); } What I