Reader SDK Documents

IFU011(02) Reader SDK React Native Integration Guide

Novarum DX Ltd
Instructions for Use / Guides

Document ID: IFU011 
Revision: 02 
Released: Aug 5, 2026 

1. Overview

This guide explains how to integrate the Novarum Reader SDK for React Native into customer applications. The SDK supports camera capture, analysis, PMF fitting, strip status reporting, and result callback handling.

Version-specific changes, issue lists, and upgrade deltas should be kept in the relevant release notes rather than repeated here. For the v4.0.1 release-specific notes, including the changes from v3.0.2, see v4.0.1 Expo React Native.

Current example baseline: examples in this guide use the scoped package name @novarumdx/ndx-imaging-expo and the current supported platform targets. If integrating a different SDK version, confirm exact version numbers, platform requirements, and known issues against that version’s release note.

2. Project Setup

2.1. Minimum Requirements

Item

Minimum

Expo SDK

56

Minimum Android SDK

26+

Android compileSdk

36

Java / JVM target

17

Minimum iOS deployment target

16.4+

2.2. Registry Authentication

2.2.1. Installation

Access to the NovarumDX private npm registry is provided via AWS CodeArtifact. Before adding the dependency, install and configure the AWS CLI using the credentials provided by Novarum.

Bash
brew install awscli

2.2.2. Profile Configuration

Bash
aws configure --profile ndxcodeartifact

For non-interactive environments, configure credentials directly in the build environment:

Bash
aws configure set aws_access_key_id "${ECR_KEY}" --profile ndxcodeartifact
aws configure set aws_secret_access_key "${ECR_SECRET}" --profile ndxcodeartifact
aws configure set region "${AWS_REGION}" --profile ndxcodeartifact

2.3. NovarumDX NPM Registry Configuration

Configure npm to access the NovarumDX CodeArtifact registry.

The authentication token is scoped to the configured registry and expires periodically, so regenerate it when package installation fails due to registry authentication.

Bash
aws codeartifact login --tool npm --domain novarumdx --domain-owner 945969778369 --repository novarum.client.npm --profile ndxcodeartifact --namespace novarumdx

2.3.1. Module Installation

The npm module is self-contained for published-package consumers and includes the required native Android AAR and iOS XCFramework dependencies.

Bash
npm install @novarumdx/ndx-imaging-expo@4.0.1

Or:

Bash
yarn add @novarumdx/ndx-imaging-expo@4.0.1

Alternatively, edit the application package.json dependencies section:

JSON
{
  "dependencies": {
    "@novarumdx/ndx-imaging-expo": "4.0.1"
  }
}

2.4. Expo Configuration

Configure the minimum deployment targets in Expo app.json using the expo-build-properties plugin.

JSON
{
  "plugins": [
    [
      "expo-build-properties",
      {
        "ios": {
          "deploymentTarget": "16.4"
        },
        "android": {
          "minSdkVersion": 26,
          "compileSdkVersion": 36
        }
      }
    ]
  ]
}

2.5. Platform Configuration

The SDK requires access to the camera. Configure the camera permissions message in Expo using the included @novarumdx/ndx-imaging-expo config plugin.

JSON
[
  "@novarumdx/ndx-imaging-expo",
  {
    "cameraPermission": "Allow this app to access your camera to scan tests."
  }
]

Request camera permission before displaying NdxImagingExpoView.

2.5.1. Camera Permissions Request Example

TypeScript
import React from "react";
import { View, Text, Button } from "react-native";
import { useCameraPermissions } from "@novarumdx/ndx-imaging-expo";

function AppContent() {
  return <Text>Camera is ready. Your app goes here.</Text>;
}

export default function App() {
  const [permission, requestPermission] = useCameraPermissions();

  if (!permission) {
    return (
      <View style={{ flex: 1, alignItems: "center", justifyContent: "center" }}>
        <Text>Loading...</Text>
      </View>
    );
  }

  if (!permission.granted) {
    return (
      <View style={{ flex: 1, alignItems: "center", justifyContent: "center", padding: 16 }}>
        <Text style={{ textAlign: "center", marginBottom: 16 }}>
          We need camera access to continue.
        </Text>
        <Button title="Grant Camera Permission" onPress={requestPermission} />
      </View>
    );
  }

  return <AppContent />;
}

3. Using the Reader View

The Novarum Analyzer Preview is the primary camera component used to display the live feed and perform test analysis.

3.1. Loading the Analyser Configuration

Load the analyser configuration JSON file provided by Novarum. For v4.x, confirm the file uses the current reader JSON format with the {estimators: [ wrapper.

TypeScript
import testConfigJson from './assets/test-config.json';

const testInfoJson = JSON.stringify(testConfigJson);

3.2. Displaying the Reader View

TypeScript
import React, { useRef } from 'react';
import { Button, StyleSheet, View } from 'react-native';
import {
  NdxImagingExpoView,
  type CompleteEvent,
  type AbortEvent,
  type FrameCapturedEvent,
} from '@novarumdx/ndx-imaging-expo';
import testConfigJson from './assets/test-config.json';

export function ScannerPage({ navigation }) {
  const cameraRef = useRef<any>(null);
  const testInfoJson = JSON.stringify(testConfigJson);

  return (
    <View style={styles.container}>
      <NdxImagingExpoView
        ref={cameraRef}
        style={styles.camera}
        testInfoJson={testInfoJson}
        previewMode="Fit"
        onFrameCaptured={({ nativeEvent }: { nativeEvent: FrameCapturedEvent }) => {
          const { frame } = nativeEvent;
          console.log('Frame progress:', frame.progress);
          console.log('PMF result:', frame.resultPMF);
          console.log('Strip statuses:', frame.stripStatuses);
          console.log('Lux:', frame.lux);
          console.log('Orientation:', frame.orientation);
        }}
        onComplete={({ nativeEvent }: { nativeEvent: CompleteEvent }) => {
          const { resultModel } = nativeEvent;
          console.log('Scan complete!', resultModel);
          navigation.navigate('ResultDetail', resultModel);
        }}
        onAbort={({ nativeEvent }: { nativeEvent: AbortEvent }) => {
          const { resultModel } = nativeEvent;
          console.log('Scan aborted', resultModel);
          navigation.navigate('ResultDetail', resultModel);
        }}
      />
      <Button title="Cancel" onPress={() => cameraRef.current?.abort()} />
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#000',
  },
  camera: {
    flex: 1,
  },
});

3.3. Parameter Overview

Parameter

Type

Required

Description

testInfoJson

string

Required

A stringified analyser configuration JSON object defining the test setup and analysis parameters.

previewMode

string

Optional

Controls camera preview scaling within the view. Common values are Fit and Fill.

onFrameCaptured

(event: { nativeEvent: FrameCapturedEvent }) => void

Optional

Triggered for every processed frame. Useful for progress, strip status, lighting, and orientation feedback.

onComplete

(event: { nativeEvent: CompleteEvent }) => void

Optional

Invoked when analysis completes and provides the full ResultModel.

onAbort

(event: { nativeEvent: AbortEvent }) => void

Optional

Invoked when the native scan is aborted and provides the available ResultModel.

ViewProps

ViewProps

Optional

The component also accepts standard React Native view props, including style.

To provide an in-app cancel action, keep a ref to NdxImagingExpoView and call cameraRef.current?.abort(). The native onAbort callback will then receive the available ResultModel.

3.4. Callback Data Structures

TypeScript
export type FrameCapturedCallback = {
  /** Fractional progress of the capture or analysis (0.0 to 1.0). */
  progress: Float;
  /** Result from the Point Model Fitter (PMF) analysis. */
  resultPMF: keyof typeof ResultPMF;
  /** Statuses of detected strips in the frame. */
  stripStatuses: (keyof typeof StripStatus)[];
  /** Device or image orientation as [roll, pitch, yaw] (Euler angles). */
  orientation: Double[];
  /** Ambient light level in lux. */
  lux: Float;
};

3.4.1. ResultModel

3.4.2. ResultModel

3.5. Related Data Types

Type

Kind

Description

ResultPMF

enum

Indicates the per-frame fit result: None, Fit, MarginalFit, or NoFit.

StripStatus

enum

Indicates strip condition: None, ExposureError, BaselineError, Good, or Done.

TestStrip

type

Contains data for one analysed strip, including C-line, T-lines, profiles, and baselines.

FrameDataRecord

type

Metadata for each captured frame, including lighting, homography, orientation, and PMF story data.

TestConfigurationRecord

type

Configuration parameters used for the test analysis.

For full type definitions, refer to the TypeScript source declarations in the @novarumdx/ndx-imaging-expo package.

3.6. Behaviour Notes

  • previewMode determines how the live camera preview scales to your layout. Fill maximises coverage, while Fit ensures full frame visibility.

  • The v4.0.1 layout fixes should be regression-tested in full-screen, flex, embedded, and partial-screen layouts on both iOS and Android.

  • Screen keep-awake: while the reader is visible, the SDK keeps the screen active during capture. Verify on physical release builds that normal dimming and auto-lock behaviour resumes after leaving the reader.

  • Backgrounding/foregrounding: when the app is backgrounded, the SDK releases the camera session. On foregrounding, the camera reinitialises automatically. Verify that the reader resumes correctly on physical devices after a background/foreground cycle.

  • PMFInitialHScaleFactor is part of the test configuration passed to the module. Set it in testConfig.PMFInitialHScaleFactor; where the configuration also includes pointModel.initial_h_factor, keep both values aligned.

3.7. Optional: SVG Overlay Visualisation

The SDK supports an optional SVG-based overlay rendering mode for higher-quality graphics and scalable test result visuals.

  • Default visualisation mode: dotMatrix.

  • To enable SVG overlays, request an updated Analyser Configuration File from Novarum support.

  • No code changes are required; the overlay mode is controlled via configuration.

4. Support & Troubleshooting

Symptom

Cause

Resolution

Build fails with invalid target JDK

Using JDK 11 or 1.8

Update Gradle JDK to 17.

AGP / Gradle mismatch

Android build tooling below the supported Expo/native SDK baseline

Update Android build tooling to the versions required by the Expo SDK 56 project.

Cannot access CodeArtifact

Invalid or expired AWS token

Regenerate the token or verify the AWS CLI profile and CodeArtifact login command.

NPM registry token expiry

The CodeArtifact authentication token used by npm has expired.

Regenerate the token with aws codeartifact login --tool npm --domain novarumdx --domain-owner 945969778369 --repository novarum.client.npm --profile ndxcodeartifact --namespace novarumdx, then rerun the package installation command.

Camera not activating on iOS

Missing NSCameraUsageDescription or camera permission not requested before rendering the reader.

Configure the camera permission message through the @novarumdx/ndx-imaging-expo config plugin and request camera permission before displaying NdxImagingExpoView.

Camera not activating on Android

Camera permission has not been granted before rendering the reader.

Use useCameraPermissions to request permission before displaying NdxImagingExpoView. The Expo config plugin adds the required Android permission during native project generation.

Reader file fails to load or analysis does not start

Older reader JSON format

Update the reader file to the current v4 JSON format with the {estimators: [ wrapper.

Reader view appears cropped or incorrectly positioned

Host layout, previewMode, or unsupported partial-screen assumptions

Use v4.0.1 or later and regression test both Fit and Fill modes in the intended layout.

For access credentials, configuration files, or integration assistance, contact your Novarum support representative or technical account manager.

For streamlined support and rapid troubleshooting, users can access the Novarum service desk. This portal provides a direct channel for submitting integration queries, reporting issues, and tracking the status of requests.

We recommend using this resource for the fastest resolution of SDK-related issues or to obtain up-to-date technical guidance.

5. Version Compatibility Summary

This guide intentionally avoids duplicating release-specific change logs. Use the release note for the SDK version being integrated to confirm exact package version, supported Expo and native build baselines, known issues, and upgrade actions.

6. Document History

Revision Summary Date
01 Initial revision for 3.0.0 expo integration Dec 18, 2025
02 Revision for Expo React Native v4.0.1 Aug 5, 2026