Kezern
Kezern

Reputation: 473

Phonegap3 plugins

I'm trying to set up a project with phonegap 3.3.0. I followed the instructions for redownloading the whole with npm and compile and everything works fine. I have followed this tutorial.

   http://codingsquare.blogspot.com/2013/08/creating-cordova-3-android-project.html

Now I want to install the necessary plugins to access device and following the tutorials I see that I need to do with the command ...

   cordova plugin add org.apache.cordova.device

This works for me if I create a new project, compile, so I import in eclipse and all is well. But what should be done to an existing project that you want to add the functionality? That to me is not too clear.

Upvotes: 1

Views: 67

Answers (1)

MBillau
MBillau

Reputation: 5376

If you are using Cordova 3.x, at any time during your development you can add and remove plugins with that command. So say you add the device plugin and build a hello world app. Then tomorrow you want to add the Camera functionality. You can just navigate to the top level app folder and run the cordova commands to add the Camera plugin. Then you can start using this code. When you test, you'll have to rerun the cordova build command to copy the code from your "staging area" (the /www/ folder) to the location it needs to be in the mobile app (different for each platform.)

Upvotes: 1

Related Questions