MCamera

From HTML5 Builder
Jump to: navigation, search

MCamera lets your application access device’s default camera application.

Functions

These are JavaScript functions you can call when you use this component in a screen.

Note: Replace ComponentName with the actual name of the component, that is, the value of its Name property. For example: MCamera1.

ComponentNameGetPicture
Opens device’s camera application to take a picture. If picture is taken, it triggers OnSuccess event, else it triggers OnError.

Events

These are JavaScript MCamera events you can associate to JavaScript functions.

OnError
This event gets triggered when, for some reason, a picture was not taken after calling ComponentNameGetPicture. Its only parameter is a string with a description of the circumstances which prevented the picture from being taken.
OnSuccess
This event gets triggered when a picture is taken after calling ComponentNameGetPicture. Its only parameter is a string which the location of the image file.

See Also