Using Cordoba and its plugins at a remote URL

I like to use the Cordova plugin and InAppBrowser with the remote webapp, when I open my application it loads an external webapp, like this <content src="http://mywebapp.domain.com" /> , but with this method I don’t have access to any either plugins.

So, I also tried with jquery:

config.xml

 <content src="index.html" /> <access origin="*" /> 

index.html:

 <div id="remoteframe"></div> $('#remoteframe"').load('http://mywebapp.domain.com'); 

With this, I have access to the cord and all plugins, but the root inside http://mywebapp.domain.com no longer works (no css, no js, ​​no route ..) and the method looks very dirty.

Is there any way to do this?

+5
source share
1 answer

So, I finally found, I had to include this in my remote page ( http://mywebapp.domain.com ):

<script src="/js/cordova.js"></script> <script src="/js/inappbrowser.js"></script>

And apparently cordova_plugins.js should be in the / js / folder (in the same folder as cordova.js).

For multipliers, you may need to change using right cordova.js.

+2
source

Source: https://habr.com/ru/post/1215895/


All Articles