CameraViews are used to access the device camera.
You can use the
The camera needs some time to initialize first.
You can define a callback function via SetOnReady which is called if the camera can be used.
There you have to to call the StartPreview function of the CameraView control to start the preview.
The basic functionality of the camera control is taking pictures or recording video.
But it provides advanced image processing functions as well. These are color reporting, motion detection and face recognision.
More samples can be found in the samples section of DroidScript.
Methods
The following methods are available on the CameraView object:
Batch(
properties )
Focus()
GetAbsHeight() → Number: integer
GetAbsWidth() → Number: integer
GetCameraCount() → Number: integer
GetColorEffects() → String: “none” , “mono” , “negative” , “solarize” , “sepia” , “posterize” , “whiteboard” , “blackboard” , “aqua” , “vage-cold” , “point-blue” , “point-red-yellow” , “emboss” , “sketch” , “neon”
GetImageHeight() → Number: fraction (0..1)
GetImageWidth() → Number: fraction (0..1)
GetMaxZoom() → Number
GetParent() → app object
GetType() → String: “CameraView”
GetZoom() → Number
Gone()
HasFlash() → Boolean
Hide()
IsEnabled() → Boolean
IsRecording() → Boolean
IsVisible() → Boolean
SetEnabled(
enable )
SetFocusMode(
mode )
Show()
Stop()
TakePicture(
file )