Accessing cordova plugins from remote page

103 views
Skip to first unread message

Rahul Pawar

unread,
Oct 20, 2016, 10:44:37 AM10/20/16
to phonegap
Hello friends,

I am developing an app for Android & IOS platform. My Phonegap version is 6.3.4.

I want to access Phonegap API's (such as location, file and DB) from my app which is hosted on server.

For that I have opened my remote page from index.html using "window.open(url,"_self","location=no");". Which loads the page in cordova's default webview.

I have also added cordova.js, cordova_plugins.js & plugins folder to my server.

But I am getting null by using cordova.file.applicationDirectory.

I am getting following log in console.

deviceready has not fired after 5 seconds.
Channel not fired: onFileSystemPathsReady
Channel not fired: onCordovaInfoReady
Channel not fired: onCordovaConnectionReady

Please guide me how can I achieve this. 
I can not keep my app files locally.

Thank you.
- Rahul

Kerri Shotts

unread,
Oct 20, 2016, 10:56:58 AM10/20/16
to phonegap
This is not a supported use case for Cordova and raises all sorts of huge security concerns. You should keep as much of your app as is possible local to the device, and use XHR over HTTPS to communicate with your backend. You can also use code push services to deliver updates outside of the app store process.

Furthermore, Apple /will/ reject an app that wraps a website in this manner.

On Thursday, October 20, 2016 at 9:44:37 AM UTC-5, Rahul Pawar wrote:
...

James Henderson

unread,
Nov 9, 2016, 9:50:08 AM11/9/16
to phon...@googlegroups.com
Hi Rahul

Did you get it working? I get the same (channel etc) errors as you have listed. Please help!

Best regards, James


--
-- You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phon...@googlegroups.com
To unsubscribe from this group, send email to
phonegap+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en
 
For more info on PhoneGap or to download the code go to www.phonegap.com
---
You received this message because you are subscribed to the Google Groups "phonegap" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phonegap+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages