Use image injection

Learn how to test your app camera using image injection, so you can ensure end-users can take photos or scan QR codes with your app.

Before you start

There are 2 ways to enable image injection for your app:

  • Either enable Instrument application for camera injection when installing your app before you test your in-app camera.

  • Or follow this guide to add Kobiton image injection SDK into your Android apps.

    Do not enable Instrument application for camera injection when installing an app that already has image injection SDK added.

Add an image to the library

To add an image to your injection library, select Image Injection, Set Simulated Image, then choose one or more .jpg, .jpeg, or .png files from your computer.

"A manual session with image injection open and the icon highlighted.

Remove an image from the library

To remove an image from your injection library, select the x icon in the corner of an image.

"A manual session with image injection open and the icon highlighted.

Inject an image

To inject an image into your app, launch the app and open the in-app camera. Choose an image from the library, then select Inject.

A close-up of the image injection library containing one image.

When you’re finished, select Reset Camera to stop image injection.


  • Image Injection is available in a manual session only.

  • The Reset Camera button on the Image Injection dialog is always available even when no image is injected.

  • When injecting an image into an app that has not implemented the custom SDK or has not enabled image injection via instrumentation when installing, the system still sends an inject successfully message.

  • Images cannot be injected into some Android applications due to the immense number of required libraries, we currently support the most common libraries. If you encounter issues, please contact our Support team through

  • App instrumentation is not working on a few Android applications, especially those applications that are obfuscated with DexGuard. For these apps, add the image injection SDK instead.

  • When using image injection, the injected image is rotated.

  • The injected image is zoomed a little when in use, compared to the actual size.

  • No image size in the image injection control’s UI.

Known issues

The application with custom SDK crashes when attempting to start the camera services.

Cause: The custom SDK utilizes hidden APIs from Android, which may not be turned on and cause the app to crash.

Solution: Enable a Cleanup Policy with Device settings will be reset option checked. If no Cleanup Policy is enabled, enter the following command in adb shell:

settings put global hidden_api_policy 1