Android Camera View Plugin

This plugin allows you to show one camera preview as a native object on android.

Platforms:

this plugin only works android 4.3+, Please note this plugin allows you to display one camera view

Functions:

androidCameraView.enableFlash(enable)

-- note camera view must be displayed first

enable(boolean)(optional) deafult is true, use false to disable

androidCameraView.hasFlash(path)

-- retruns boolean

androidCameraView.capturePhoto(path, listener, quality)

-- note camera view must be displayed first

path(string) path to save the .jpg photo via system.pathForFile

listener(function)(optional) returns event.status == "complete" when photo is taken

quality(number)(optional) value between 1-100, default is 100

androidCameraView.getCameraSize()

-- returns numbers width, height

androidCameraView.newView(params)

-- returns androidCameraView Object(see bellow)

params(table) contain the folling params

  • x(number) x point of camera view y(number) y point of camera view width(number) width of camera view height(number) height of camera view frontCamera(boolean)(optional) should use front camera (default is false)
  • androidCameraView properties:

    x(number) x point of camera view (example myView.x = 20)

    y(number) y point of camera view (example myView.y = 20)

    width(number) width of camera view(example myView.width = 100)

    height(number) height of camera view(example myView.height = 100)

    androidCameraView methods:

    :destroy() -- destory the camera view

    :hide() -- hide the camera view

    :unhide() -- unhide the camera view

    :setRotation(rotation) -- unhide the camera view

    rotation(number) degrees to rotate the view

    Build Settings:

    Helpful Links:

    Example

    Support