Rate This Document
Findability
Accuracy
Completeness
Readability

Setting Sensor Properties

Case No.

4.1.14

Test Objective

Verify that the sensor mock properties on the three axes (x, y, and z) and data collection frequency properties can be modified.

Test Networking

N/A

Prerequisites

  1. The basic environment of the Kbox cloud phone has been deployed.
  2. A Kbox cloud phone container has been created and connected to the ADB.

Test Procedure

  1. At the PC command prompt or on the server, run the adb -s [ip:port] shell setprop persist.sensors.mock.id [0/1] command to set the sensor ID to 0 or 1. 0 indicates the acceleration sensor, and 1 indicates the gyroscope. If you want to set the acceleration sensor, set the sensor ID to 0. If you want to set the gyroscope, set the sensor ID to 1.
  2. At the PC command prompt or on the server, run the adb -s [ip:port] shell setprop persist.sensors.mock.data.[x/y/z] xx command (xx can be any value within the range of ±3.402823466e+38) to modify the x-axis, y-axis, and z-axis parameters of the sensor.
  3. Open sensors_test.apk and query the values of sensor properties.
  4. At the PC command prompt or on the server, run the adb -s [ip:port] shell setprop persist.sensors.mock.delaytime xx command (xx indicates any value in [20000,1000000]) to set the sensor mock data collection frequency.
  5. Repeat steps 1 and 2.
  6. Observe the change duration of the sensor properties after changing the data collection frequency.

Expected Result

  1. No error is reported during the setting.
  2. The parameters are set successfully.
  3. The parameters are queried successfully.
  4. The change duration of the sensor properties vary according to the data collection frequency.

Test Result

  

Remarks