Skip to content

ReactNative SDK 3.7.1

Sample Code

The easiest and fastest way to get started with the SDK is to download and try the sample code. We provide full featured samples for different frameworks and platforms for developer to start with:

Download ReactNative 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.

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.7.1.tgz"
bash
yarn add "https://sdk.panoptic.ai/npm/react-native-vital-sign-plugin-3.7.1.tgz"

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
        flutter_additional_ios_build_settings(target)
    end
end

What's new

3.7.1

  • Fixed the blank camera problem on some Android devices.
  • Added enableAgeProjection property. If it is not set, default is true.
  • The property device is changed to optional.
  • Improved iOS simulator support.

IMPORTANT

To avoid the Android blank camera problem, please update the code to pass in the correct device to the component. It is because some Android devices do not have the wide-screen-camera. An althernative to fix the problem is to omit the device property and let the SDK to select the correct camera. For detail, please refer to the sample code.

3.6.1

  • Fixed the Android "Device not supported" problem.
  • Updated the type of AgeProjectionResult.error property.

3.6.0

  • Fixed the iOS "Device not supported" problem.

  • Added AgeProjectionResult.error property, with the following possible values:

    typescript
    {
      cause:
        |'age projection service not ready'
        |'missing user info for age projection'
        |'missing api key for age projection'
        |unknown;
    }
  • Added AgeProjectionConfig to set the photo taking time of age projection. (Default photo taking time is 3 seocnds after start scanning).

3.5.1

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