Skip to main content

Image injection in remote devices

Applications such as banking and payment apps, lifestyle apps, and social media apps use the mobile device camera to capture images and scan QR codes or barcodes.

App Live enables you to test image capture and QR code/barcode scanning for your apps on remote BrowserStack devices. You can upload an image, QR code, or barcode to the remote device by using the Image Injection feature. The uploaded image or QR/barcode is used as input to the remote device camera to simulate the action of capturing an image or scanning a code.

By using Image Injection on App Live, you can test your app for scenarios such as:

  • Capturing images of checks, receipts, and other images.
  • Scanning QR code.
  • Scanning barcode.
Note: You can enable the Image Injection, Biometric Authentication, and Device Passcode settings together in the same test session on App Live.

In this guide, you learn about:

Supported devices, apps, and images/QR codes/barcodes

App Live supports testing your app with Image Injection on the following devices:

Devices running Android OS 6 and higher.

Devices running iOS 13 and higher.

The devices that do not support testing with Image Injection appear grayed out in the device listing on the App Live dashboard. Unsupported devices grayed out

App Live supports testing of the following types of apps using Image Injection:

App Live supports testing of the following types of images or QR codes/barcodes using Image Injection:

  • Images or QR codes/barcodes in the .jpg, .jpeg, and .png formats.
  • Image/QR code/barcode size not exceeding 10 MB.

Enable Image Injection setting for your app

Important: App Live does not support apps that use code obfuscation tools like Proguard, to be tested using Image Injection. Ensure that you disable obfuscation before uploading your app on App Live.
  1. Log in to the App Live dashboard.
  2. On the App Live dashboard, upload your app from the left panel.
  3. After your app is uploaded, click the configuration icon next to the file name of your app. Configuration icon
  4. Under App Configurations, enable Image Injection. Enable toggle button
  5. Select your device from the list of available devices in the device listing on the right panel, to launch your test session.
Important: To test your app using Image Injection, ensure that you disable the iOS Entitlements setting under App Configurations. App Live does not support testing of iOS apps with both the iOS Entitlements and Image Injection settings enabled.
  1. Log in to the App Live dashboard.
  2. On the App Live dashboard, upload your app from the left panel.
  3. After your app is uploaded, click the configuration icon next to the file name of your app. Configuration icon
  4. Under App Configurations, enable Image Injection. Enable toggle button
  5. Select your device from the list of available devices in the device listing on the right panel, to launch your test session.

Your setup session takes approximately 60 seconds.

Upload your image or QR code/barcode

Prerequisite:
Enable Image Injection setting for your app.

To upload your image/QR code/barcode:

  1. On the App Live vertical toolbar, click Image Injection.
    A sample image is available on the device. You can use the sample image or upload your own image/QR code/barcode.
  2. On the Image Injection prompt, click Upload new asset to upload your own image/QR code/barcode.
  3. On your system, select the image/QR code/barcode that you want to upload, and click Open.
    The Image Injection prompt displays the following:
    • The progress bar while the image/QR code/barcode is being uploaded. Click Cancel if you want to cancel the current upload and upload another image/QR code/barcode.
    • A preview of the image/QR code/barcode after the upload is complete. Image/QR/barcode upload complete

Test your app using the uploaded image or QR code/barcode

Prerequisites:

To test your app using the uploaded image/QR code/barcode:

  1. In your app, trigger the image capture or QR code/barcode scanning workflow.
  2. Give your app the permission to access the device camera.
    A blank screen in displayed.
  3. Click the camera shutter button.
  4. Click Use Photo.
    The image or QR code/barcode that you uploaded is displayed.

Additional Information

  • A sample image is available on the remote device. When you upload your image/QR code/barcode, the uploaded image or QR/barcode replaces the sample image.
  • If you upload a new image/QR code/barcode, the new image/QR/barcode replaces the old image/QR/barcode.
  • If you do not upload any new image/QR code/barcode to the remote device for 30 days, your last uploaded image or QR/barcode is removed and is replaced with the sample image.

Troubleshooting

The troubleshooting page lists some common errors that you may see while testing your app using Image Injection.

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback!

Talk to an Expert
Talk to an Expert