I would like to use Callbacks in my StateMachine to fetch values from Callback class, that is set in the native Android code.
Is this a right approach to create one? Do you see any issues with the code?
public class PrintCallBack {
private static String bluetoothDevices = "";
private static String errorMsg = "";
private static int result = 0;
public static String getBluetoothDevices() {
return bluetoothDevices;
}
public static void setBluetoothDevices(String bluetoothDevices) {
PrintCallBack.bluetoothDevices = bluetoothDevices;
}
public static String getErrorMsg() {
return errorMsg;
}
public static void setErrorMsg(String errorMsg) {
PrintCallBack.errorMsg = errorMsg;
}
public static int getResult() {
return result;
}
public static void setResult(int result) {
PrintCallBack.result = result;
}
public static void initialize(){
bluetoothDevices = "";
errorMsg = "";
result = 0;
}
}