Cordove connection problem with page open in InAppBrower and plugin print

53 views
Skip to first unread message

locationweb locationweb

unread,
Jun 23, 2018, 6:05:46 AM6/23/18
to phonegap
Hello
I work on a cordova app.
My application uses 3 Network Information / InAppbrowser plugin / printer (cordova-plugin-printer / Splashscreen
When my application start, I test the network (network plugin okk)
My page index.html (login page), after test opens a remote page in InAppbrowser via a script like this openBrowser (urltelechargement);
My problem !!
The page opened in InAppbrowser has no contact with the print plugin.
To do a test I wrote a test.js page placed in the directori / script
The functions (script / test.js) to run for testing in my remote page loaded in InAppbrowser does not work !!
I just want to print via onclick = \ "printer () \" a remote page http://locationweb.be/serveur/ticket.php
How to make the call and open page in InAppbrowser use the printer plugin.
Am I making a mistake? I am beginner with cordova !!
My project is blocked for the moment !! I am looking for a solution for 3 weeks.
Thanks for your help

Stéphane (sorry for my english!)

Pete

unread,
Jun 25, 2018, 8:39:41 PM6/25/18
to phonegap
Once you send the user to a URL via inAppBrowser, the content is out of your control and your plugins are not available to the user.

What you may want to do is use an iFrame but this will only work if the destination url can be white listed. If you can't white list the destination URL (i.e. you don't know what the destination url will be) you're screwed. What you can do is use a static destination on your server and have your server load the content and feed that content to your app.  This way, you're white listing your server and your server is feeding you the content it found. Mind you, I wouldn't do it as you've blown all your security and Apple probably wouldn't approve it (Google doesn't seem to share the same concerns that Apple has) but you could do it.

locationweb locationweb

unread,
Jun 26, 2018, 5:31:56 AM6/26/18
to phonegap
Ok thanks
Stéphane
Reply all
Reply to author
Forward
0 new messages