Flutter SDK 1.5.2
SDK Installation
- Download the Flutter SDK here.
- Unzip the downloaded SDK zip file to a folder in your local drive.
Sample Code
The quickest and simplest way to kickstart your journey with the Flutter SDK is by downloading and experimenting with our full-featured sample code. To run the sample code, go to the demo_app folder, execute the commands:
flutter pub get
flutter runIMPORTANT
In the above sample codes, the strings __YOUR_USER_ID__ and __YOUR_API_KEY__ should be replaced by your own User ID and API Key repectively. Please contact us to obtain your User ID and API Key.
Project Integration
To integrate our Flutter SDK into your Flutter project, add the Flutter SDK package by:
flutter pub add vital_sign_camera --path "/path_of_downloaded_folder/flutter-vital-sign-sdk/vital_sign_camera"Please replace the string path_of_downloaded_folder above with the actual downloaded path.
Project Integration (for iOS)
Camera Permission
When developing for iOS, you need to allow the app to use the camera by specifying the following in the file Info.plist:
<key>NSCameraUsageDescription</key>
<string>Use for measuring vital signs</string>TIP
In Info.plist, the string "Use for measuring vital signs" is an example description of the camera usage. You should specify your own description that matches the usage of your application.
Project Integration (for Android)
IMPORTANT
Please note that for Android, the minimum SDK version must be at least 24.
Add the following line to the file android/settings.gradle:
include ':vital-sign-engine'
project(':vital-sign-engine').projectDir = new File('/path_of_downloaded_folder/flutter-vital-sign-sdk/vital_sign_camera/android/libs')Please replace the string path_of_downloaded_folder above with the actual downloaded path.
Camera Permission
When developing for Android, you need to allow the app to use the camera by specifying the following in the file AndroidManifest.xml:
<uses-permission android:name="android.permission.CAMERA" />Migration from 1.2.x
One of the dependencies ZIPFoundation needs to have minimum deployment target of iOS 11. If you upgrade the SDK from 1.2.x to 1.4.x, please update the Podfile with one of the following methods:
Method 1
Modify the
post_installsection ofPodfileto forceZIPFoundation's deployment target to iOS 11:rubypost_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| # Force ZIPFoundation's deployment target to iOS 11 if target.name == 'ZIPFoundation' config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0' end # Support x86_64 simulator only config.build_settings['ARCHS[sdk=iphonesimulator*]'] = 'x86_64' end flutter_additional_ios_build_settings(target) end endIn the
iOSfolder, run:consolepod install
Method 2
Set the project deployment target to iOS 11:
rubyplatform :ios, '11.0'Re-install the Pods. In iOS folder run:
consolerm Podfile.lock rm -rf Pods pod install
What's new
1.5.2 (20-Jan-2025)
Fixed sample app not showing health result problem, the below code fragment in old versions is wrong. The line checking the stage should be removed.
dart/* The line checking the stage should be removed. Otherwise the result screen cannot show. */ if (_healthResult == null && event.healthResult?.health != null && event.healthResult?.stage == GetHealthStage.analyzingData) { Navigator.push( context, MaterialPageRoute( builder: (context) => ResultScreen( healthResult: _healthResult, ), ), ); }The correct code should be:
dartif (_healthResult == null && event.healthResult?.health != null) { Navigator.push( context, MaterialPageRoute( builder: (context) => ResultScreen( healthResult: _healthResult, ), ), ); }
IMPORTANT
Please update your app code if you are following incorrect old demo app code.
1.5.1 (26-Feb-2024)
- Fixed a bug in sample code that wrong server is being used.
1.5.0 (19-Jan-2024)
- Updated the
queryCameraDevicesAPI to not to accept optional parameter. - Fixed the Android blank camera problem.
- Fixed the wrong state exception.