Silk Mobile

Table of Contents (Homepage)

SimulateCapture

images/images/os-icons/os_android_150x150.png

Description

The command will allow to set the path of the image which will be used as the camera fake input.

The Command will allow real camera preview to work until the mock image is sent.

Parameters

  • Picture Path - The picture's full path

Usage

The command allow to set camera input for camera testing.

When the user starts his app he will see the real preview of the camera as usual until he will send the mock image .
When the client will send to the mock image for the camera the preview will change to show the image.

To use the camera mock image you need to instrument your application with the camera flag by using manual instrumentation - In this link.

Code Examples

Java Example
 client.simulateCapture("C:\\images\\image.jpg");
C# Example
 client.SimulateCapture("C:\\images\\image.jpg");
VBScript Example
client.SimulateCapture("C:\\images\\image.jpg")
Python Example
 self.client.simulateCapture("C:\\images\\image.jpg")
Perl Example
 $client->simulateCapture("C:\\images\\image.jpg");