Table of Contents

Codeunit Camera

ID 1907
Namespace: System.Device

Provides the functions for getting the data from a camera on the client device.

Properties

Name Value
Access Public
InherentEntitlements X
InherentPermissions X

Methods

GetPicture

Takes a picture from a camera on the client device and returns the data in the InStream.

procedure GetPicture(PictureInStream: InStream, var PictureName: Text): Boolean

Parameters

Name Type Description
PictureInStream InStream

An InStream object that will hold the image in case taking a picture was successful.

PictureName Text

A generated name for the taken picture. It will include the current date and time (for example, "Picture_05_03_2020_12_49_23.jpeg").

Returns

Type Description
Boolean

True if the camera is available, the user took a picture and decided to use it, false otherwise.

GetPicture

Takes a picture from a camera on the client device and returns the data in the InStream.

procedure GetPicture(Quality: Integer, PictureInStream: InStream, var PictureName: Text): Boolean

Parameters

Name Type Description
Quality Integer

Sets the quality of the saved image, expressed as a number between 0 and 100, where 100 is the highest available resolution.

PictureInStream InStream

An InStream object that will hold the image in case taking a picture was successful.

PictureName Text

A generated name for the taken picture. It will include the current date and time (for example, "Picture_05_03_2020_12_49_23.jpeg").

Returns

Type Description
Boolean

True if the camera is available, the user took a picture and decided to use it, false otherwise.

IsAvailable

Checks whether the camera on the client device is available.

procedure IsAvailable(): Boolean

Returns

Type Description
Boolean

True if the camera is available, false otherwise.

See also