Using the Cordova Camera Plugin



This video talks about how you can use the cordova Camera plugin to take pictures from your Hybrid App.
The example uses Android, however the script will work on either iOS or Android.
I use Android for the example because the iOS Simulator will NOT allow you to use the camera.

Code GIST:

Camera Documentation:

android eclipse tutorial

15 Comments on “Using the Cordova Camera Plugin”

  1. mr Steve i did the same code but it doesn't work when i click on the buttom can you please help me
    this is what the android studio says to me :
    Unrecognized profile 2130706433 for video/avc
    Unrecognized profile 2130706433 for video/avc
    Unrecognized profile 2130706433 for video/avc
    Unrecognized profile 2130706433 for video/avc
    Unrecognized profile 2130706433 for video/avc
    W/VideoCapabilities: Unrecognized profile 2130706433 for video/avc
    Unrecognized profile 2130706433 for video/avc
    Unrecognized profile 2130706433 for video/avc
    Unrecognized profile 2130706433 for video/avc
    Unrecognized profile 2130706434 for video/avc
    Unrecognized profile 2130706434 for video/avc
    Unrecognized profile 2130706434 for video/avc
    Unrecognized profile 2130706434 for video/avc
    Unrecognized profile 2130706434 for video/avc
    Unrecognized profile 2130706434 for video/avc
    Unrecognized profile 2130706434 for video/avc
    Unrecognized profile 2130706434 for video/avc
    Unrecognized profile 2130706434 for video/avc
    Unrecognized profile 2130706434 for video/avc
    Unrecognized profile 2130706434 for video/avc
    Unrecognized profile 2130706434 for video/avc
    Unrecognized profile 2130706434 for video/avc
    Unrecognized profile 2130706434 for video/avc
    Unrecognized profile 2130706434 for video/avc
    Unrecognized profile 2130706434 for video/avc
    I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@a5bdc7d time:3038087
    W/cr_CrashFileManager: /data/user/0/io.cordova.hello/cache/WebView/Crash Reports does not exist or is not a directory
    W/VideoCapabilities: Unrecognized profile/level 32768/2 for video/mp4v-es
    I/VideoCapabilities: Unsupported profile 4 for video/mp4v-es
    W/VideoCapabilities: Unsupported mime video/sorenson
    E/AndroidProtocolHandler: Unable to open asset URL: file:///android_asset/www/logo.png
    D/SystemWebChromeClient: file:///android_asset/www/js/index.js: Line 30 : Uncaught TypeError: document.addventlistener is not a function
    I/chromium: [INFO:CONSOLE(30)] "Uncaught TypeError: document.addventlistener is not a function", source: file:///android_asset/www/js/index.js (30)
    D/JsMessageQueue: Set native->JS mode to EvalBridgeMode
    E/chromium: [ERROR:BudgetService.cpp(160)] Unable to connect to the Mojo BudgetService.
    D/CordovaWebViewImpl: onPageFinished(file:///android_asset/www/index.html)

  2. Thank you for doing this! I'm a noob when it comes to development, but excited to give this a shot. I'm also a fan of Apache Cordova, though there doesn't seem to be a big community around it. More videos on the plugins would be nice for a novice like me. Cheers!

  3. Thanks for this, but do you happen to know how to add HMR, or LiveReload, or simply refresh Cordova apps while developing? I can't figure it out and it's really throwing a wrench in my development speed.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.