Search code examples
cordovavisual-studio-2015cordova-pluginsvisual-studio-cordova

how to generate an camera app in cordova using Visual studio 15


I am just starting to use cordova in Visual studio 15 in my windows 8 system. I want a basic app which has a button "Take Photo" and it should do so when I run my app in any device, whether andriod, ios or windows phone and finaly store the image in some location. I was reading the cordova docs about it and got fully confused. I also want to know whether the look and feel of the app will change when I install the apps into various devices.

Please help!


Solution

  • You'll want to use the cordova-plugin-camera plugin (as mentioned in the comments) to take a picture. When you use that plugin you can also specify a DestinationType of FILE_URI or NATIVE_URI and it will save the picture to disk.

    As for your question about look and feel: Cordova itself doesn't do anything to provide you a user interface that adapts its UI, but you can use a framework like OnsenUI or Ionic to do this.

    To experiment with Ionic, and the Camera plugin, try a tutorial I wrote awhile back, which walks you through both of these.