For the complete documentation index, see llms.txt. This page is also available as Markdown.

Native Features Integration

The phone exposes several native components (Camera, Gallery, Inputs) that you can trigger from your app.

Camera

Opens the phone's camera to take a photo or video.

REACT
// Callback receives the URL of the uploaded media
const cameraCallback = useCallback((url: string) => {
    console.log('Captured media:', url);
}, []);

// openCameraComponent(callback, disablePhoto, disableVideo)
openCameraComponent(cameraCallback, false, false);
Argument
Type
Optional
Explanation

callback

(url: string) => void

Function triggered when media is saved. Receives the URL.

disablePhoto

boolean

If true, the photo mode will be disabled. Default value is false

disableVideo

boolean

If true, the video mode will be disabled. Default value is false

Opens the gallery for the user to select existing media.

REACT
const galleryCallback = useCallback((data: string | string[]) => {
    console.log('Selected:', data);
}, []);

// openGalleryPicker(callback, multiple, type, enableLinkInput)
openGalleryPicker(galleryCallback, true, 'image', true);
Argument
Type
Optional
Explanation

callback

(data: string | string[]) => void

Triggered when media is selected. Returns URL or array of URLs.

multiple

boolean

If true, user can select multiple items. Default value is false

type

'image' | 'video' | 'both'

What type of media should be pickable. Default value is 'image'

enableLink

boolean

If true, allows user to input a custom URL link. Default value is false

Contact Picker

Opens the contacts list to select a phone number.

Argument
Type
Optional
Explanation

callback

(number: string) => void

Triggered when a contact is selected. Returns the phone number.

Emoji & GIF Pickers

Argument
Type
Optional
Explanation

callback

(emoji: string) => void

Triggered when an emoji/GIF is selected. Returns the emoji char/gif url.

Listen to AppOpen/AppClose

You can use such event to listen if app was opened or closed

Last updated