Installation
The fastest way to arrive at a working setup is to try out our example apps on GitHub: https://github.com/mxlaboratories/shenai-sdk (opens in a new tab)
To add the SDK to an existing app, see documentation for the relevant platform:
See Flutter for installation instructions.
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 (opens in a new tab) 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
}
});