Use a Camera widget to display a button that opens the device's native camera application to capture an image. By default, a saved image is stored as a PNG (Portable Network Graphics) image with the original size.
To learn how to use this widget programmatically, refer Kony Visualizer Widget guide.
Note: The Camera widget is not supported on SPA platforms.
Look properties define the appearance of the widget. The following are the major properties you can set:
For descriptions of the properties available on the Look tab of the Properties pane, see Look.
Skin properties define a skin for the widget, including background color, borders, and shadows. If the widget includes text, you can also specify the text font.
For the Camera widget, you can apply a skin and its associated properties for the following states:
Skin | Definition |
---|---|
Normal | The default skin of the widget. |
Focus | The skin applied when the widget has the focus. |
Hover Skin |
The look and feel of the widget when the cursor hovers over it. Note: Hover skins are available only on the Windows (native) Tablet platform. |
For more information about applying skins, see Understanding Skins and Themes.
Camera properties specify properties that are available on any platform supported by Kony Visualizer, and assign platform-specific properties.
Note: In this section, the properties that can be forked are identified by an icon located to the left of the property. For more information, see Fork a Widget Property.
Specifies how the captured image is stored.
Following are the options:
To specify the access mode, click the Edit button to open the Access Mode dialog box. To change the default access mode, select Default and then select an access mode from the value list. To specify a platform-specific access mode, select the platform and then select an access mode from the list.
For JPEG images, specifies the compression level with which a captured image is stored. The compression level determines picture quality. You can specify a compression level value between 0 (best picture quality) and 100 (low picture quality).
Default: 0
To specify the compression level, click Edit to open the Compression Level dialog box. To change the default compression level, select Default and then select a compression level from the value list. To specify a platform-specific compression level, select the platform and then select a compression level from the list.
Applicable when the capture mode is photo mode.
Specifies the overlay configuration parameters for overlaying a form.
The following are the configurable properties available for various platforms:
iOS
Default : None
Default : None
Android
Default : None
Default : None
Default : false
Windows 8
Default : None
Default : None
Default : false
Applicable when the capture mode is video mode.
Specifies the overlay configuration parameters for overlaying a form.
The following are the configurable properties available for various platforms:
iOS
Default : None
Android
Default : None
Windows 8
Default : None
Default : None
Default : false
Specifies the ratio by which a captured image is scaled down. You can specify a scale factor between 10 percent of the captured image and 100 percent (no reduction).
Specifies whether to enable overlay of a form interface over the camera view.
Default: Disabled.
To specify the Enable Overlay property, click Edit to display the Enable Overlay dialog box. To change the default Enable Overlay setting, select Default and then select a value from the list. To specify a platform-specific Enable Overlay setting, select the platform and then select a value from the list.
Specifies the capture mode of the camera. You can select Photo Mode or Video Mode.
Specifies the camera source, either Default, Rear, or Front.
When Capture Mode is set to Video Mode, specifies the duration of the video in seconds.
For the iOS platform, specifies the orientation of the captured image, either Default, Landscape, or Portrait.
Default: Default
For the iOS platform, specifies whether the image is saved as a PNG (Portable Network Graphics) or a JPEG (Joint Photographic Experts Group) image.
Default: PNG
For the iOS platform, specifies whether the camera uses the native interface with the default platform controls for the camera, or a user interface with custom options.
Default: On (the camera uses the native interface)
For the iOS platform when Capture Mode is set to Video Mode, specifies whether the video is saved in Mp4 or MOV format.
Default: MP4
For the Android platform, specifies whether video stabilization is enabled.
Default: Off (video stabilization is disabled)
For the Windows platform, specifies whether the captured image can be cropped.
Default: Off (photo crop is disabled)
For the Windows Tablet platform, specifies a message that displays when you hover the mouse pointer over the widget.
Actions define what happens when an event occurs. On a Camera widget, you can run an action when the following events occur:
For more information, see Add Actions.
The following table summarizes where a Camera widget can be placed:
Form | Yes |
HBox | Yes |
VBox | Yes |
ScrollBox | Horizontal
Orientation -Yes Vertical Orientation- Yes |
Tab | Yes |
FlexContainer | Yes |
FlexScrollContainer | Yes |
Segment | No |
Popup | Yes |
Template
|
Header- No Footer- No |
The appearance of the Camera widget varies as follows:
Platform | Appearance |
---|---|
Android | |
iOS |
Rev | Author | Edits |
8 | SHS | SHS |
7.2.1 | SHS | SHS |
Copyright © 2013 Kony, Inc. All rights reserved. |