Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
  • Cordova Picture Background Plugin to Capture Image without User Interaction

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 1
    • 0
    • 1.03k
    Comment on it

    Cordova is a mobile application development framework Owned by Adobe System, it was first created by Nitobi but in 2011 Adobe System acquires/purchases it.  Earlier Crodova is known as PhoneGap. It is a free and open source version of Apache Crodova whose main goal is to develop a mobile app without the knowledge and use of mobile programming languages "Android, iOS", Only using of HTMl, CSS and JavaScript.



    In today's topic, we will discuss Cordova picture background plugin for more on PhoneGap you can veiw other tutorials from "".

    let's come to the topic back, Basically this plugin captures an image without user interaction and allows to capture an image without open device camera. You will find the captured image in device external storage. This plugin supports Android platform only.


    First of all, We need to install Cordova picture background plugin in our PhoneGap project through CLI:

    Cordova plugin add


    Plugin Usage:

    var options = {
      name: "myImage", //image suffix
      dirName: "CameraPictureBackground", //foldername
      orientation: "landscape", //or portrait
      type: "back" //or front
    window.plugins.CameraPictureBackground.takePicture(success, error, options);
    function success(imgurl) {
      console.log("Imgurl = " + imgurl);

    In the above code, window.plugins.CameraPictureBackground.takePicture invokes the device camera.


    We can define some options also :

    name: It defines the name of captured image. For ex. In the above code, myImage will be the name of captured image.

    DirName: In device external storage this will be the name of the folder in which captured image will be stored.

    Orientation: When taking a picture we can define its orientation i.e landscape or portrait.

    Type: Defines the camera type i.e front or back camera.


    Hope this will help you, for any quires feel free to write in comment section below.


    Cordova Picture Background Plugin to Capture Image without User Interaction

 0 Comment(s)

Sign In

Sign up using

Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: