Software Archive
Read-only legacy content
17061 Discussions

No Done or Exit option in inAppBrowser on iPad

Rohan_L_
Beginner
477 Views

Hi,

I am using XDK 3641 with a Cordova project and the inAppBrowser to load external pdf's in my app. I am running the app in App Preview.

This works well on iOS for iPhone but when running on an iPad the is no exit or done button in the new browser window so the user has to kill the app.

Code is:

window.open(url, '_system', 'location=yes');

What could be causing this behaviour?

 

0 Kudos
3 Replies
Jerroyd_M_Intel
Employee
477 Views

Hi Rohan,

Because this is a HTML5 app running on the phone, using window.open would replace your app with the web page you're loading. You could try serving the page in an iframe. The reason you would see a different behavior from App Preview is, App Preview is also using a similar strategy of previewing your app in a container not so dissimilar from an iframe. 

0 Kudos
Rohan_L_
Beginner
477 Views

Thanks Jerroyd but it does work on an iPhone, a new window is presented to view the content and I have a done button to return to the app.
I would have thought that on an iPad the behaviour would be the same?

Iframe is an issue due to external contact servers not allowing their use, I have tried that but would ideally like the above behaviour on all devices.



 

 

 

0 Kudos
PaulF_IntelCorp
Employee
477 Views

Rohan -- use the inAppBrowser API, not window.open and see the API docs here > https://github.com/apache/cordova-plugin-inappbrowser#cordovainappbrowseropen < I suspect the "iOS only" option named "closebuttoncaption" is what you need.

0 Kudos
Reply