Smart Camera Pixelnetica™ Document Scanning SDK for Android

The camera library provides an activity that offers a ‘Smart Camera’ feature: it estimates document scan quality and provides users with live feedback during document capture to reduce common scanning errors.

Include into the Project

Add the dependency to your module-level build script:

   dependencies {
       implementation("com.pixelnetica.sdk:camera:3.0.1")
       // Other dependencies
   }

Or, if you use the Version Catalog:

dependencies {
  implementation(libs.pixelnetica.camera)
  // Other dependencies
}

Usage

Register the CameraContract in your Activity, Fragment, or Composable:

In an Activity or Fragment

private val cameraRequest = registerForActivityResult(CameraContract()) { uriList ->
    // Handle the result
}

In a Composable

val cameraLauncher = rememberLauncherForActivityResult(
    contract = CameraContract()
) { uriList ->
    // Handle the result
}

Launching the Camera Activity

cameraLauncher.launch(CameraContract.CameraParams())

You can specify multiple parameters. See the reference for CameraContract.CameraParams for more details.

Top