Appearance
SDK Integration
Once you receive the Binah_Flutter_SDK_<VERSION/>.zip
file, you are ready to add the Flutter SDK to your application.
Follow the steps below to integrate the SDK into your application.
1. Add the Framework to your Project
1.1. Extract the content of the Binah_Flutter_SDK_<VERSION/>.zip
file into the root folder of your project.
1.2. Add the following to your pubspec.yaml
, under the dependencies
section:
binah_flutter_sdk:
path: ./Binah_Flutter_SDK_<VERSION>
1.3. Run the following commands:
flutter pub get
cd ios
pod install
2. Android Integration with the SDK
2.1. In android/app/build.gradle
modify minSdkVersion to 27.
2.2. In android/app/build.gradle
under the dependencies
section, add the library:
implementation (name: 'bnhsdk', ext: 'aar')
2.3. In android/app/src/main/AndroidManifest.xml
add the following:
<uses-permission android:name="android.permission.CAMERA"/>
<uses-feature android:name="android.hardware.camera" android:required="true"/>
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>
<uses-feature android:name="android.hardware.camera.front" android:required="true"/>
<uses-feature android:name="android.hardware.camera.front.autofocus" android:required="false"/>
2.4. In android/app/src/main/java/<YOUR_PATH>/MainActivity.java
make sure MainActivity
extends either FlutterActivity
or FlutterFragmentActivity
:
Kotlin
package ai.binah.flutter_sample
import io.flutter.embedding.android.FlutterActivity
class MainActivity: FlutterActivity() {
}
Java
package ai.binah.flutter_sample;
import io.flutter.embedding.android.FlutterActivity;
public class MainActivity extends FlutterActivity {
}
3. iOS Integration with the SDK
- Grant the application camera permission in
info.plist
:
<key>NSCameraUsageDescription</key>
<string>Used for vital signs monitoring</string>
- Open Xcode, and update project's target, under "Build Settings" as shown below:
- Make sure "-lstdc++" & "-ObjC" exists under "Other Linker Flags"
- Make sure to update "C++ Language Dialect" to "C++17"