Skip to main content

Camera Image Injection on Real Devices

LambdaTest's Camera Image Injection empowers you to test various camera-related functionalities of your app across a vast array of real mobile devices. This innovative feature supports image capture testing, QR code scanning verification and Barcode scanning assessment.

Use Cases

  • URL-embedded QR code scans
  • Digital check processing
  • Profile photo capture
  • In-app image upload functionality

How It Works

The Image Injection process leverages Sensor Instrumentation technology. When activated for a test session, it injects LambdaTest's proprietary camera module into your application and emulates or supersedes the native Android/iOS camera SDK

Key Features

  • Extensive device compatibility (3000+ real devices)
  • Comprehensive support for image-based functionalities
  • Effortless integration with existing test environments
note
  • Video capture and other media types are not currently supported.
  • For iOS apps signed with Enterprise Certificates, app resigning (a prerequisite for using the Image Injection tool) is not available.

Supported Camera APIs

Below given is the list of Camera APIs which are supported by LambdaTest Image Injection tool. Please ensure that your app uses these APIs only to enable Image Injection.

Supported APIs
didFinishPickingMediaWithInfo API of UIImagePickerController iOS SDK class for capturing an image.

📕 For details, please check Apple documentation
AVCapturePhoto iOS SDK class for receiving captured photos from AVCapturePhotoOutput API.

📕 For details, please check Apple Documentation.

Image Injection in Real Device App Testing

This feature helps you inject any image which you want your app to click or scan through the device camera. You just need to follow the steps given below:

Step 1: Click on the Real Devices > App Testing

Step 2: Select your required device and upload your application which supports the camera APIs listed above.

Step 3: Now, hover over your app and click on the Settings icon. Toggle the Image Injection option and click on Save Changes button. Click on Start to run your app on the selected device.

Step 4: After the above config, click on the Start button to start the session. Now, go to Device Controls in the toolbar as shown below. Select Image Injection and click Upload Image to inject the desired image from your computer to the app.

Step 5: You can see the image preview in the Image Injection section. You can delete or reupload the image from here.

Step 6: Now go to camera feature in your app, the camera pops up. When you click the image from your app, you will see a black image. Please proceed with the same by clicking on Use Photo.

Step 7: The black image is now replaced with an injected image.

info

The clicked image is black because the Cameras of LambdaTest Real Devices are taped for security reasons. Thus we inject image through Sensor Instrumentation.

Test across 3000+ combinations of browsers, real devices & OS.

Book Demo

Help and Support

Related Articles