Installation
The recommended way to add the Shen.AI SDK to an app is through the package manager for your platform or framework. This keeps SDK updates explicit, versioned, and integrated with your normal dependency restore flow.
Package-manager distribution is available for the generic SDK on Android, iOS, Web, Flutter, React Native, Capacitor, and MAUI. Linux headless SDKs are distributed as archives through the Customer Portal because those integrations are usually embedded into custom capture pipelines.
The fastest way to arrive at a working setup is to try out our example apps on GitHub .
To add the SDK to an existing app, use the platform page for the package you need:
Install shenai_sdk from pub.dev. See Flutter for installation instructions.
For the Linux headless SDKs, see Linux headless C SDK and Linux headless Python SDK.
Permissions
To utilize the SDK, your app will need to have the Network and Camera permissions.
Add the following lines to your AndroidManifest.xml.
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-permission android:name="android.permission.INTERNET"/>You can use permission_handler plugin to request the permissions:
import 'package:permission_handler/permission_handler.dart';
...
Permission.camera.request().then((permission) async {
if (permission == PermissionStatus.granted || permission == PermissionStatus.limited) {
// Proceed with SDK initialization
}
});