Skill Level: Any
The Target Simulator is not expected to be used in most scenarios. It should only be used when the Android Image Capture Tool is unable to support your image replay experience. The tool supports MD5, SHA256 or SHA512 formats. For example, to capture all MD5s.
The Target Simulator acts as a target page on your local machine. After you start the simulator, you exercise every page in your application. The simulator takes the images that are embedded in the application, uses the image check sum to create a unique file name for each image, and saves the images in the same location as the Target Simulator tool. After you have the images, they must be transferred to the replay server images folder.
Before you begin using the Target Simulator, download and install the
node.js SDK on your local machine. You can obtain an installer from the Android SDK package or http://www.ibm.com/developerworks/web/nodesdk/. Only the Acoustic SDK for Node.js is supported.
Change your directory to the folder where the Android Image Capture tool is located:
cd <path to Target Simulator>
Use the command:
node target_sim.js MD5
Your terminal should look like this:
Select Open an existing Android Studio project.
Select your application's project.
- Replace the
PostMessageUrlvalue with one of the target URLs (from the terminal), as shown below:
- Check that
The Android SDK has built in SHA256 image hashing support. If you need to use other algorithms, import the appropriate aar file into your project by going to this link: https://github.com/ibm-watson-cxa/Android_Maven/tree/master/com/ea
- MD5 hashing
- SHA512 hashing
Every .png image of your applications is extracted. On the terminal, you should see the following:
In the Target Simulator directory (where the
target_sim.js is located), there is a folder called "images." All its content must be added to the "images" folder that is uploaded to Replay.
You can use the Target Simulator tool to capture the images in your application and transfer them to the replay server for replay.
For MD5, the image file name's length is 32. For SHA256, the image file name's length is 64. For SHA512, the image file name's length is 128.
Updated 3 months ago