|
Novarum DX Ltd
|
Document ID: IFU006
|
1. Overview
Reader SDK v2.1.1 introduces the PMF Story data model, abort functionality, and enhanced per-frame callbacks that provide richer insight into the analysis process.
These foundational changes enable detailed frame-level diagnostics and laid the groundwork for future visualization and data capture improvements in later versions.
2. New Features
2.1. PMF Story Output
A new structured data model, PMF Story, is now included in the SDK output.
It provides a complete timeline of captured frames during the analysis process, recording details such as:
-
Timestamp
-
PMF status (analysis state)
-
Lux (lighting level)
-
Device orientation
-
Homography transform
-
Per-strip baselines, profiles, and statuses
-
Frame and strip images
This enables developers to visualize analysis progress, collect diagnostic logs, and post-process frame data.
2.2. Abort Functionality
Developers can now abort analysis sessions early and retrieve all PMF Story frames captured up to that point.
This allows partial data review even if the full analysis doesn’t complete.
-
The returned
ResultModelincludes a completepmfStorywith all frames collected before the abort. -
Aborted sessions cannot be resumed — a new analysis must be started afterward.
Both Android and iOS expose new abort-related API elements (see platform pages for examples).
2.3. Per-Frame Callback Expansion
The previous onProgress callback has been replaced by onFrameCaptured, which provides richer context for each captured frame.
This callback now includes analysis progress, lux, orientation, and status information per frame.
3. API Changes
3.1. Model Updates
The addition of PMF Story required updates to the ResultModel and TestStrip data structures to eliminate duplicate image storage and improve consistency.
|
Model |
Old |
New |
|---|---|---|
|
TestStrip |
Included |
Removed; images now stored in PMF Story frames |
|
ResultModel |
Included |
Removed; replaced by per-frame images in PMF Story |
These changes affect integrations that previously accessed image data directly from the result models.
Developers should now access frame and strip images from ResultModel.pmfStory.
4. Internal Enhancement
Collection Mode
An internal capture-only mode for development and QA.
This mode performs no analysis and is not available in the public SDK.
5. Developer Migration Summary
|
Area |
Action Required |
|---|---|
|
Image Access |
Use |
|
Progress Callbacks |
Replace |
|
Aborting Analysis |
Implement abort handling for partial results |
|
Collection Mode |
No developer action (internal only) |
6. Platform-Specific Notes
See examples and API notes
6.1. Android - Migration Guide
The Android SDK introduces abort handling and per-frame callbacks for real-time analysis tracking.
It also adapts model structures to integrate with the new PMF Story output.
6.1.1. Key API Additions
6.1.1.1. onFrameCaptured Callback
Replaces the old onProgress callback with frame-level updates.
data class FrameCapturedCallback(
val progress: Float,
val resultPMF: ResultPMF,
val stripStatuses: List<StripStatus>,
val orientation: List<Double>,
val lux: Float,
)
Typical usage:
preview.onFrameCaptured = { callback ->
progress = callback.progress
}
6.1.2. Abort Support
New ability to stop analysis early and retrieve partial PMF Story data.
val result = preview.abort() // returns ResultModel with collected PMF Story frames
Integrate with Compose using a simplified example:
@Composable
fun ReaderView(config: AnalyserConfiguration) {
var progress by remember { mutableFloatStateOf(0f) }
AndroidView(factory = { ctx ->
NovarumAnalyzerPreview(ctx).apply {
analyzerConfig = config
onFrameCaptured = { progress = it.progress }
onComplete = { /* handle result */ }
}
})
BackHandler { /* call onAbort(preview.abort()) */ }
}
6.1.3. ResultModel Update
ResultModel now includes the pmfStory collection, replacing the deprecated base64 image fields.
data class ResultModel(
val testConfiguration: TestConfiguration,
val testStrips: List<TestStrip>,
val pmfStory: List<FrameData>,
)
6.1.4. Migration Notes
|
Change |
Action |
|---|---|
|
|
Update callback handling |
|
Abort method added |
Optional: implement user cancel flow |
|
Model changes |
Adjust integrations accessing image data |
6.2. iOS - Migration Guide
The iOS SDK now provides frame-level callbacks, an abort mechanism, and improved data models compatible with PMF Story output.
6.2.1. Key API Additions
6.2.1.1. onFrameCaptured Callback
Replaces onProgress with richer frame context.
public struct FrameCapturedCallback {
public let progress: Float
public let resultPMF: ResultPMF
public let orientation: [Double]
public let lux: Float
}
Usage:
readerView.onFrameCaptured = { frame in
print("Progress: \(frame.progress), Lux: \(frame.lux)")
}
6.2.2. Abort Support
Added onAbort callback and SwiftUI binding for abort handling.
@State private var isAborted = false
ReaderViewWrapper(
analyserConfiguration: config,
onAbort: { model in
// handle abort event with partial PMF Story data
},
isAborted: $isAborted
)
-
Returns partial
ResultModelcontaining collectedpmfStoryframes -
Aborted analyses cannot be resumed
6.2.3. ResultModel Update
ResultModel now includes a pmfStory array to store per-frame analysis data, removing deprecated base64 image fields.
6.2.4. Migration Notes
|
Change |
Action |
|---|---|
|
Added |
Handle user cancellation if required |
|
Added |
Replace old |
|
Model change |
Update integrations to use |