public class StateCode {
/*---------------------------------------------------------------------
*connection status
* ---------------------------------------------------------------------*/
public final static int CONNECTION_OK = 1; //Connection successful
public final static int CONNECTION_FAILED = 2; //Connection Fail
public final static int CONNECTION_DISCONNECT = 0;//disconnect
public final static int CONNECTION_CONNECTING = 3;//connecting
public final static int CONNECTION_CONNECTED = 4; //connected
/*---------------------------------------------------------------------
* Response Status
* ---------------------------------------------------------------------*/
public final static int STATUS_SUCCESS = 0; //successful
public final static int STATUS_FAIL = 1; //failure
public final static int STATUS_UNKOWN_CMD = 2; //unknown command
public final static int STATUS_BUSY = 3; //device is busy
public final static int STATUS_NO_RESOURCE = 4; //no resource
public final static int STATUS_CRC_ERROR = 5; //CRC check error
public final static int STATUS_ALL_DATA_CRC_ERROR = 6; //all data CRC error
public final static int STATUS_PARAMETER_ERROR = 7; //parameter error
public final static int STATUS_RESPONSE_DATA_OVER_LIMIT = 8; //The reply data exceeded the limit
/*--------------------------------------------------------------------
* TWS
*--------------------------------------------------------------------*/
/* =================== *
* earphone status
* =================== */
//Do not display popovers
public final static int TWS_HEADSET_STATUS_DIMISS = 0;
//Bluetooth is disconnected
public final static int TWS_HEADSET_STATUS_DISCONNECTED = 1;
//Bluetooth is connected
public final static int TWS_HEADSET_STATUS_CONNECTED = 2;
//Bluetooth is connecting
public final static int TWS_HEADSET_STATUS_CONNECTING = 3;
//C0
public final static int ADV_SETTINGS_ERROR_IN_GAME_MODE = 1; //Game mode causes Settings to fail
//The length of bluetooth name exceeds the limit
public final static int ADV_SETTINGS_ERROR_DEVICE_NAME_LENGTH_OVER_LIMIT = 2;
//Failed to set flash in non-Bluetooth mode
public final static int ADV_SETTINGS_ERROR_LED_SETTINGS_FAILED = 3;
}