System settings

The Cruzr robot has some system setting parameters, which are often used by users, such as robot serial number, enterprise number, etc. Now, the methods will be provided.

Get Setting Data

The following methods are called to get the setting state data of the robot .

String value = SettingValueFetcher.getStringValue(context,key,defaultValue);

The parameters are described as follows :

Type Parameter Description
Context mContext(required) context
String key (required) The field value of the data you want to get
String defaultValue(required) Default data returned if the query fails or there is no data in the database

Modify Setting Data

Modify setting data

boolean insertSuccess = SettingValueFetcher.setStringValue(context,key,value)

The parameters are described as follows:

Type Parameter Discription(Judge whether the operation is successful according to the boolean type of the return value)
Context mContext(required) context
String key (required) The field value of the data you want to modify
String value(required) The data you want to modify

Modifiable settings are as follows:

key value Description (R:read,W:write)
SerialText "**" Unique identification of the robot(R)
cruiser_chassis_motion_state true/false Control the chassis on or off(RW)
cruiser_hand_motion_state true/false Control the arms on or off(RW)
visual_wakeup_state true/false Control visual wake-up on or off(RW)
key_sound_localization true/false Control sound source positioning on or off(RW)
language zh_CN/en_US Set the language of the robot(W)