Capabilities

takePicture

Updated:

Launches the Android or iOS camera.

takePicture is only supported inside the Q2 mobile banking app. It is not available in the mobile browser or desktop browser.

Description

takePicture sends a message to the platform to open a camera. The image taken is returned via a promise as a base64-encoded string. It takes two arguments: topText and bottomText. These strings are displayed above and below the image viewer in camera mode.

Signature

tecton.sources.takePicture(pictureOptions?: PictureOptions): Promise<string>;
export interface PictureOptions {
    topText?: string;
    bottomText?: string;
}

Usage

Capture a picture with custom overlay and help text. The returned picture data is a base64-encoded string.

const pictureData = await tecton.sources.takePicture({
    topText: 'Capture Image',
    bottomText: 'Center the image in the frame and tap the button'
});

Parameters

pictureOptions.topText
pictureOptions.bottomText

Platform Support

iOS
Android

Changelog

The changelog provides a detailed history of new features, improvements, and bug fixes going back to Tecton 1.30.0. If the button is disabled, it indicates there have been no detectable changes since then.

Show changelog (0)