Skip to content

ReactNative SDK 3.5.1

Sample Code

The quickest and simplest way to kickstart your journey with the ReactNative SDK is by downloading and experimenting with our full-featured sample code:

IMPORTANT

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.

SDK Installation

In your ReactNative project, install the SDK with the npm install or yarn add commands:

bash
npm install "https://sdk.panoptic.ai/npm/react-native-vital-sign-plugin-3.5.1.tgz"
bash
yarn add "https://sdk.panoptic.ai/npm/react-native-vital-sign-plugin-3.5.1.tgz"

TIP

If you are using Yarn v2 or later, you might need to include the package name in the command, such as yarn add vital-sign-camera@"https://sdk.panoptic.ai/npm/react-native-vital-sign-plugin-3.5.1.tgz".

Project Integration (for iOS)

For iOS Deployment Target 12 or above

One of the dependencies ZIPFoundation needs to have deployment target of iOS 11. Please update the Podfile to force ZIPFoundation's deployment target to 11:

ruby
post_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
    end
end

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:

xml
<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)

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:

xml
<uses-permission android:name="android.permission.CAMERA" />

What's new

3.5.1 (27-Oct-2023)

  • Increased age projection image resolution.
  • Use the gender input instead of gender detection.
  • Added new prop AgeProjectionEndPoint to support different end points.