Skip to main content

Manual Selfie

Get the selfie module from the main AmaniSDK instance which you have previously initialized.

const onStart = useCallback(() => {
AmaniSDK.sharedInstance.selfie.start().then((image) => setImageData(image));
}, [navigation]);

After getting the image data from the SDK, you can use it with Image component image data is base64 encoded string.

To upload the image use the upload method.

const uploadSelfie = useCallback(() => {
AmaniSDK.sharedInstance.selfie
.upload()
.then((uploadState) => setUploadState(uploadState));
});