Skip to main content

Declaring Kotlin Multiplatform camera permissions

Android camera permission

The Scanbot SDK requires camera access to scan from a live camera stream. Add the camera permission to your AndroidManifest.xml file:

<manifest xmlns:android="http://schemas.android.com/apk/res/android" ...>

<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" />

<application ...>

Note how we also added the uses-feature tag for better recognition of your app on the Google Play Store (more about this in the Android developer documentation).

Since Android 6.0 (API level 23), you also have to implement a suitable permission requesting and handling at runtime. For more details, please refer to the Android documentation.

iOS camera permission

Add the NSCameraUsageDescription key to your Info.plist file:

Follow these steps to add the camera usage description:

  • Open your Info.plist file.
  • Click the + button and start typing Privacy - Camera Usage Description.
  • Provide a brief, user-friendly explanation of why your app needs camera access, such as: Please allow camera usage to scan .

For more details on requesting authorization to capture and save media, refer to the Apple documentation.

Want to scan longer than one minute?

Generate a free trial license to test the Scanbot SDK thoroughly.

Get free trial license