Configuration
Shen.AI (ANVISA) uses the standard SDK APIs with a fixed product configuration. You can visit the Shen.AI (ANVISA) Web Playground at playground.shen.ai/?sdkBuild=anvisa to test the locked settings and calibration flow in context.
The build keeps runtime controls such as initialization mode, language selection, and camera-error inspection. The measurement preset is fixed to the one-minute all-metrics scan, with ANVISA results limited to the supported public metrics.
Initialization Mode
This parameter determines which mode the SDK uses:
MEASUREMENT(default): standard measurement with no calibration data.CALIBRATION: starts the calibration workflow, requiring external BP readings and performing multiple SDK scans.CALIBRATED_MEASUREMENT: applies previously stored calibration data (if available) to adjust blood pressure metrics.
See Calibration for a full description of these modes and usage instructions.
Language
Shen.AI (ANVISA) supports English (en) and Brazilian Portuguese (pt-br). You can provide either language in initialization settings where the platform exposes it, or change between them at runtime with setLanguage. Unsupported language values are normalized to en.
ShenaiSdk.setLanguage("pt-br");
ShenaiSdk.setLanguage("en");Camera Error
Use getLastCameraError() to discover why a camera request failed to start. The method returns null / nil / std::nullopt when there is no current camera startup error, including when the camera is intentionally off.
The public camera error enum currently contains:
PermissionNotGranted: the app or browser does not currently have camera permission.InvalidDeviceId: the requested device ID does not correspond to an available camera.NoCameraDevice: no suitable camera device is available on the system.DeviceUnavailable: a camera exists but cannot be used right now, for example because it is busy or temporarily disconnected.UnsupportedMode: the requested camera mode is not supported on the current platform.Unknown: camera startup failed for another reason.
enum CameraError {
permissionNotGranted,
invalidDeviceId,
noCameraDevice,
deviceUnavailable,
unsupportedMode,
unknown,
}
final CameraError? error = await ShenaiSdk.getLastCameraError();View placement (Capacitor)
On Capacitor for Android and iOS, the SDK preview is rendered in a native view below the WebView, with the WebView background set to transparent so the camera feed stays visible. Touch events on the WebView are forwarded to the SDK view automatically.
Use setViewRect to position the preview in platform view units (omit or pass 0 for width/height to fill the parent). Use setOverlaysWebview to control whether the SDK view sits above or below the WebView (default: below).
import { ShenaiSdkCapacitor } from "capacitor-shenai-sdk"
// Position the preview in platform view units.
await ShenaiSdkCapacitor.setViewRect({ x: 16, y: 16, width: 240, height: 320 })
// true = SDK above WebView, false = SDK below WebView
await ShenaiSdkCapacitor.setOverlaysWebview({ overlay: true })