MobileChromeApps / chrome-app-developer-tool

Mirror of Apache Cordova app harness
Other
202 stars 33 forks source link

Cordova contacts plugin doesn't work within CADT or in CDE #49

Open uriva opened 9 years ago

uriva commented 9 years ago

How do I test my chrome mobile app using chrome-dev-editor if using the cordova contacts plugin?

If I use the "run" option in CDE, then navigator.cotacts is undefined. The same thing happens if I use "realtime deploy" with my phone.

Is there a way to solve this inside CDE? If not - it seems that CADT does not yet support all of cordova default plugins, however you can build it yourself with the additional plugins. How is this done?

mmocny commented 9 years ago

There is currently no way to do this. At the moment, CDE deploy-to-mobile can only be used for testing "pure" Chrome Apps (just like CDE Run only tests pure chrome apps).

If you would like to use the contacts plugin (or any cordova plugin) today, you can use our cca command line tool to create, plugin add, build, and finally run your application, since cca is cordova-compatible and supports extending your chrome app with cordova features.

We do want to add support for what you request, eventually. (Details below, but just ignore if its confusing)

Yes, you could build your own version of CADT today to add extra plugins, but actually the one we release already comes with all the cordova core plugins. Unfortunately the problem isn't that simple. The problem is that CADT does not currently know when to enable which third-party plugins. We don't want to just enable them all always, since enabling all plugins may have negative effects on applications that are not written to use them (many plugins clobber globals).

Our plan to address this is two fold.

mmocny commented 9 years ago

Just noticed in #31 that I once had a potentially interesting option for CDE:

Another low-road option is to add a menu to CADT main screen to manually enable plugins?

I still like that idea. Instead of relying on auto-discovery, for CDE deploys, we can just ask the developer to select which plugins to run, and remember the settings in persistent storage.