Search in sources :

Example 1 with Sheduled

use of com.eveningoutpost.dexdrip.watch.miband.message.DisplayControllMessageMiband3_4.NightMode.Sheduled in project xDrip-plus by jamorham.

the class MiBandService method processFirmwareCommands.

@SuppressLint("CheckResult")
private void processFirmwareCommands(byte[] value, boolean isSeqCommand) {
    RxBleConnection connection = I.connection;
    FirmwareOperations.SequenceType seq = firmware.getSequence();
    if (d)
        UserError.Log.d(TAG, "processFirmwareCommands: " + bytesToHex(value) + ": seq:" + seq.toString());
    if (isSeqCommand) {
        switch(seq) {
            case SET_NIGHTMODE:
                {
                    if (true) {
                        isNeedToRestoreNightMode = true;
                        DisplayControllMessageMiband3_4 dispControl = new DisplayControllMessageMiband3_4();
                        Calendar sheduledCalendar = Calendar.getInstance();
                        sheduledCalendar.set(Calendar.HOUR_OF_DAY, 0);
                        sheduledCalendar.set(Calendar.MINUTE, 0);
                        Date sheduledDate = sheduledCalendar.getTime();
                        connection.writeCharacteristic(dispControl.getCharacteristicUUID(), dispControl.setNightModeCmd(Sheduled, sheduledDate, sheduledDate)).subscribe(valB -> {
                            UserError.Log.d(TAG, "Wrote nigntmode, got: " + JoH.bytesToHex(valB));
                            firmware.nextSequence();
                            processFirmwareCommands(null, true);
                        }, throwable -> {
                            UserError.Log.e(TAG, "Could not write nigntmode: " + throwable);
                            firmware.nextSequence();
                            processFirmwareCommands(null, true);
                        });
                    } else {
                        firmware.nextSequence();
                        processFirmwareCommands(null, true);
                    }
                    break;
                }
            case PREPARE_UPLOAD:
                {
                    connection.writeCharacteristic(firmware.getFirmwareCharacteristicUUID(), firmware.prepareFWUploadInitCommand()).subscribe(valB -> {
                        UserError.Log.d(TAG, "Wrote prepareFWUploadInitCommand, got: " + JoH.bytesToHex(valB));
                    }, throwable -> {
                        UserError.Log.e(TAG, "Could not write prepareFWUploadInitCommand: " + throwable);
                        resetFirmwareState(false);
                    });
                    firmware.nextSequence();
                    break;
                }
        }
        return;
    } else {
        if (value.length != 3 && value.length != 11) {
            UserError.Log.e(TAG, "Notifications should be 3 or 11 bytes long.");
            return;
        }
        boolean success = value[2] == OperationCodes.SUCCESS;
        if (value[0] == OperationCodes.RESPONSE && success) {
            try {
                switch(value[1]) {
                    case OperationCodes.COMMAND_FIRMWARE_INIT:
                        {
                            if (seq == FirmwareOperations.SequenceType.TRANSFER_FW_START) {
                                connection.writeCharacteristic(firmware.getFirmwareCharacteristicUUID(), firmware.getFirmwareStartCommand()).subscribe(valB -> {
                                    UserError.Log.d(TAG, "Wrote Start command, got: " + JoH.bytesToHex(valB));
                                }, throwable -> {
                                    UserError.Log.e(TAG, "Could not write Start command: " + throwable);
                                    resetFirmwareState(false);
                                });
                                firmware.nextSequence();
                            } else if (seq == FirmwareOperations.SequenceType.TRANSFER_SEND_WF_INFO) {
                                connection.writeCharacteristic(firmware.getFirmwareCharacteristicUUID(), firmware.sendFwInfo()).subscribe(valB -> {
                                    UserError.Log.d(TAG, "Wrote sendFwInfo, got: " + JoH.bytesToHex(valB));
                                }, throwable -> {
                                    UserError.Log.e(TAG, "Could not write firmware info: " + throwable);
                                    resetFirmwareState(false);
                                });
                                firmware.nextSequence();
                                break;
                            }
                            break;
                        }
                    case OperationCodes.COMMAND_FIRMWARE_START_DATA:
                        {
                            sendFirmwareData();
                            break;
                        }
                    case OperationCodes.COMMAND_FIRMWARE_CHECKSUM:
                        {
                            firmware.nextSequence();
                            if (firmware.getFirmwareType() == FirmwareOperations.FirmwareType.FIRMWARE) {
                            // send reboot
                            } else {
                                UserError.Log.e(TAG, "Watch Face has been installed successfully");
                                resetFirmwareState(true);
                            }
                            break;
                        }
                    case OperationCodes.COMMAND_FIRMWARE_REBOOT:
                        {
                            UserError.Log.e(TAG, "Reboot command successfully sent.");
                            resetFirmwareState(true);
                            break;
                        }
                    default:
                        {
                            resetFirmwareState(false, "Unexpected response during firmware update");
                        }
                }
            } catch (Exception ex) {
                resetFirmwareState(false);
            }
        } else {
            String errorMessage = null;
            Boolean sendBGNotification = false;
            if (value[2] == OperationCodes.LOW_BATTERY_ERROR) {
                errorMessage = "Cannot upload watchface, low battery, please charge device";
                sendBGNotification = true;
            } else if (value[2] == OperationCodes.TIMER_RUNNING) {
                errorMessage = "Cannot upload watchface, timer running on band";
            } else if (value[2] == OperationCodes.ON_CALL) {
                errorMessage = "Cannot upload watchface, call in progress";
            } else {
                errorMessage = "Unexpected notification during firmware update:" + JoH.bytesToHex(value);
            }
            resetFirmwareState(false, errorMessage);
            if (sendBGNotification) {
                emptyQueue();
                JoH.startService(MiBandService.class, "function", "update_bg_as_notification");
                changeState(SLEEP);
            }
        }
    }
}
Also used : AUTHORIZE_FAILED(com.eveningoutpost.dexdrip.watch.miband.MiBandService.MiBandState.AUTHORIZE_FAILED) AUTH_REQUEST_RANDOM_AUTH_NUMBER(com.eveningoutpost.dexdrip.watch.miband.message.OperationCodes.AUTH_REQUEST_RANDOM_AUTH_NUMBER) AuthMessages(com.eveningoutpost.dexdrip.watch.miband.message.AuthMessages) Arrays(java.util.Arrays) com.eveningoutpost.dexdrip.xdrip(com.eveningoutpost.dexdrip.xdrip) Date(java.util.Date) TimeoutException(java.util.concurrent.TimeoutException) PendingIntent(android.app.PendingIntent) CLOSED(com.eveningoutpost.dexdrip.Services.JamBaseBluetoothSequencer.BaseState.CLOSED) INIT(com.eveningoutpost.dexdrip.Services.JamBaseBluetoothSequencer.BaseState.INIT) Inevitable(com.eveningoutpost.dexdrip.UtilityModels.Inevitable) BleCannotSetCharacteristicNotificationException(com.polidea.rxandroidble2.exceptions.BleCannotSetCharacteristicNotificationException) PowerManager(android.os.PowerManager) HeartRate(com.eveningoutpost.dexdrip.Models.HeartRate) StatusItem(com.eveningoutpost.dexdrip.UtilityModels.StatusItem) BleCharacteristicNotFoundException(com.polidea.rxandroidble2.exceptions.BleCharacteristicNotFoundException) COMMAND_ACK_FIND_PHONE_IN_PROGRESS(com.eveningoutpost.dexdrip.watch.miband.message.OperationCodes.COMMAND_ACK_FIND_PHONE_IN_PROGRESS) AUTH_FAIL(com.eveningoutpost.dexdrip.watch.miband.message.OperationCodes.AUTH_FAIL) Schedulers(io.reactivex.schedulers.Schedulers) AUTH_MIBAND4_CODE_FAIL(com.eveningoutpost.dexdrip.watch.miband.message.OperationCodes.AUTH_MIBAND4_CODE_FAIL) AUTH_RESPONSE(com.eveningoutpost.dexdrip.watch.miband.message.OperationCodes.AUTH_RESPONSE) AUTH_SEND_KEY(com.eveningoutpost.dexdrip.watch.miband.message.OperationCodes.AUTH_SEND_KEY) ActiveBgAlert(com.eveningoutpost.dexdrip.Models.ActiveBgAlert) FeaturesControllMessage(com.eveningoutpost.dexdrip.watch.miband.message.FeaturesControllMessage) MIBAND_NOTIFY_TYPE_ALARM(com.eveningoutpost.dexdrip.watch.miband.Const.MIBAND_NOTIFY_TYPE_ALARM) CLOSE(com.eveningoutpost.dexdrip.Services.JamBaseBluetoothSequencer.BaseState.CLOSE) BgReading(com.eveningoutpost.dexdrip.Models.BgReading) PrefBindingFactory(com.eveningoutpost.dexdrip.watch.PrefBindingFactory) UUID(java.util.UUID) JoH.getResourceURI(com.eveningoutpost.dexdrip.Models.JoH.getResourceURI) UNKNOWN(com.eveningoutpost.dexdrip.watch.miband.MiBand.MiBandType.UNKNOWN) JoH(com.eveningoutpost.dexdrip.Models.JoH) List(java.util.List) BleDisconnectedException(com.polidea.rxandroidble2.exceptions.BleDisconnectedException) JoH.bytesToHex(com.eveningoutpost.dexdrip.Models.JoH.bytesToHex) MIBAND_NOTIFY_TYPE_CANCEL(com.eveningoutpost.dexdrip.watch.miband.Const.MIBAND_NOTIFY_TYPE_CANCEL) R(com.eveningoutpost.dexdrip.R) Subscription(com.eveningoutpost.dexdrip.utils.bt.Subscription) PREFERRED_MTU_SIZE(com.eveningoutpost.dexdrip.watch.miband.Const.PREFERRED_MTU_SIZE) AlertLevelMessage(com.eveningoutpost.dexdrip.watch.miband.message.AlertLevelMessage) JoH.msTill(com.eveningoutpost.dexdrip.Models.JoH.msTill) AUTH_SUCCESS(com.eveningoutpost.dexdrip.watch.miband.message.OperationCodes.AUTH_SUCCESS) Getter(lombok.Getter) BluetoothGattCharacteristic(android.bluetooth.BluetoothGattCharacteristic) WakeLockTrampoline(com.eveningoutpost.dexdrip.utils.framework.WakeLockTrampoline) Constants(com.eveningoutpost.dexdrip.UtilityModels.Constants) AUTH_SEND_ENCRYPTED_AUTH_NUMBER(com.eveningoutpost.dexdrip.watch.miband.message.OperationCodes.AUTH_SEND_ENCRYPTED_AUTH_NUMBER) Pair(android.util.Pair) FirmwareOperations(com.eveningoutpost.dexdrip.watch.miband.Firmware.FirmwareOperations) DisplayControllMessageMiband3_4(com.eveningoutpost.dexdrip.watch.miband.message.DisplayControllMessageMiband3_4) RxBleConnection(com.polidea.rxandroidble2.RxBleConnection) Intent(android.content.Intent) MediaPlayer(android.media.MediaPlayer) ArrayList(java.util.ArrayList) JoH.niceTimeScalar(com.eveningoutpost.dexdrip.Models.JoH.niceTimeScalar) SuppressLint(android.annotation.SuppressLint) Calendar(java.util.Calendar) DeviceEvent(com.eveningoutpost.dexdrip.watch.miband.message.DeviceEvent) DisplayControllMessageMiBand2(com.eveningoutpost.dexdrip.watch.miband.message.DisplayControllMessageMiBand2) DisplayControllMessage(com.eveningoutpost.dexdrip.watch.miband.message.DisplayControllMessage) COMMAND_DISABLE_CALL(com.eveningoutpost.dexdrip.watch.miband.message.OperationCodes.COMMAND_DISABLE_CALL) JamBaseBluetoothSequencer(com.eveningoutpost.dexdrip.Services.JamBaseBluetoothSequencer) AlertMessage(com.eveningoutpost.dexdrip.watch.miband.message.AlertMessage) MI_BAND4(com.eveningoutpost.dexdrip.watch.miband.MiBand.MiBandType.MI_BAND4) Sheduled(com.eveningoutpost.dexdrip.watch.miband.message.DisplayControllMessageMiband3_4.NightMode.Sheduled) RxBleDeviceServices(com.polidea.rxandroidble2.RxBleDeviceServices) MI_BAND2(com.eveningoutpost.dexdrip.watch.miband.MiBand.MiBandType.MI_BAND2) JoH.emptyString(com.eveningoutpost.dexdrip.Models.JoH.emptyString) SLEEP(com.eveningoutpost.dexdrip.Services.JamBaseBluetoothSequencer.BaseState.SLEEP) BluetoothGattService(android.bluetooth.BluetoothGattService) com.eveningoutpost.dexdrip.xdrip.gs(com.eveningoutpost.dexdrip.xdrip.gs) AUTH_MIBAND4_FAIL(com.eveningoutpost.dexdrip.watch.miband.message.OperationCodes.AUTH_MIBAND4_FAIL) WatchFaceGenerator(com.eveningoutpost.dexdrip.watch.miband.Firmware.WatchFaceGenerator) AlertPlayer(com.eveningoutpost.dexdrip.UtilityModels.AlertPlayer) PoorMansConcurrentLinkedDeque(com.eveningoutpost.dexdrip.utils.framework.PoorMansConcurrentLinkedDeque) TimeUnit(java.util.concurrent.TimeUnit) MIBAND_NOTIFY_TYPE_MESSAGE(com.eveningoutpost.dexdrip.watch.miband.Const.MIBAND_NOTIFY_TYPE_MESSAGE) OperationCodes(com.eveningoutpost.dexdrip.watch.miband.message.OperationCodes) UserError(com.eveningoutpost.dexdrip.Models.UserError) MIBAND_NOTIFY_TYPE_CALL(com.eveningoutpost.dexdrip.watch.miband.Const.MIBAND_NOTIFY_TYPE_CALL) FirmwareOperations(com.eveningoutpost.dexdrip.watch.miband.Firmware.FirmwareOperations) DisplayControllMessageMiband3_4(com.eveningoutpost.dexdrip.watch.miband.message.DisplayControllMessageMiband3_4) Calendar(java.util.Calendar) RxBleConnection(com.polidea.rxandroidble2.RxBleConnection) JoH.emptyString(com.eveningoutpost.dexdrip.Models.JoH.emptyString) Date(java.util.Date) TimeoutException(java.util.concurrent.TimeoutException) BleCannotSetCharacteristicNotificationException(com.polidea.rxandroidble2.exceptions.BleCannotSetCharacteristicNotificationException) BleCharacteristicNotFoundException(com.polidea.rxandroidble2.exceptions.BleCharacteristicNotFoundException) BleDisconnectedException(com.polidea.rxandroidble2.exceptions.BleDisconnectedException) SuppressLint(android.annotation.SuppressLint)

Example 2 with Sheduled

use of com.eveningoutpost.dexdrip.watch.miband.message.DisplayControllMessageMiband3_4.NightMode.Sheduled in project xDrip by NightscoutFoundation.

the class MiBandService method processFirmwareCommands.

@SuppressLint("CheckResult")
private void processFirmwareCommands(byte[] value, boolean isSeqCommand) {
    RxBleConnection connection = I.connection;
    FirmwareOperations.SequenceType seq = firmware.getSequence();
    if (d)
        UserError.Log.d(TAG, "processFirmwareCommands: " + bytesToHex(value) + ": seq:" + seq.toString());
    if (isSeqCommand) {
        switch(seq) {
            case SET_NIGHTMODE:
                {
                    if (true) {
                        isNeedToRestoreNightMode = true;
                        DisplayControllMessageMiband3_4 dispControl = new DisplayControllMessageMiband3_4();
                        Calendar sheduledCalendar = Calendar.getInstance();
                        sheduledCalendar.set(Calendar.HOUR_OF_DAY, 0);
                        sheduledCalendar.set(Calendar.MINUTE, 0);
                        Date sheduledDate = sheduledCalendar.getTime();
                        connection.writeCharacteristic(dispControl.getCharacteristicUUID(), dispControl.setNightModeCmd(Sheduled, sheduledDate, sheduledDate)).subscribe(valB -> {
                            UserError.Log.d(TAG, "Wrote nigntmode, got: " + JoH.bytesToHex(valB));
                            firmware.nextSequence();
                            processFirmwareCommands(null, true);
                        }, throwable -> {
                            UserError.Log.e(TAG, "Could not write nigntmode: " + throwable);
                            firmware.nextSequence();
                            processFirmwareCommands(null, true);
                        });
                    } else {
                        firmware.nextSequence();
                        processFirmwareCommands(null, true);
                    }
                    break;
                }
            case PREPARE_UPLOAD:
                {
                    connection.writeCharacteristic(firmware.getFirmwareCharacteristicUUID(), firmware.prepareFWUploadInitCommand()).subscribe(valB -> {
                        UserError.Log.d(TAG, "Wrote prepareFWUploadInitCommand, got: " + JoH.bytesToHex(valB));
                    }, throwable -> {
                        UserError.Log.e(TAG, "Could not write prepareFWUploadInitCommand: " + throwable);
                        resetFirmwareState(false);
                    });
                    firmware.nextSequence();
                    break;
                }
        }
        return;
    } else {
        if (value.length != 3 && value.length != 11) {
            UserError.Log.e(TAG, "Notifications should be 3 or 11 bytes long.");
            return;
        }
        boolean success = value[2] == OperationCodes.SUCCESS;
        if (value[0] == OperationCodes.RESPONSE && success) {
            try {
                switch(value[1]) {
                    case OperationCodes.COMMAND_FIRMWARE_INIT:
                        {
                            if (seq == FirmwareOperations.SequenceType.TRANSFER_FW_START) {
                                connection.writeCharacteristic(firmware.getFirmwareCharacteristicUUID(), firmware.getFirmwareStartCommand()).subscribe(valB -> {
                                    UserError.Log.d(TAG, "Wrote Start command, got: " + JoH.bytesToHex(valB));
                                }, throwable -> {
                                    UserError.Log.e(TAG, "Could not write Start command: " + throwable);
                                    resetFirmwareState(false);
                                });
                                firmware.nextSequence();
                            } else if (seq == FirmwareOperations.SequenceType.TRANSFER_SEND_WF_INFO) {
                                connection.writeCharacteristic(firmware.getFirmwareCharacteristicUUID(), firmware.sendFwInfo()).subscribe(valB -> {
                                    UserError.Log.d(TAG, "Wrote sendFwInfo, got: " + JoH.bytesToHex(valB));
                                }, throwable -> {
                                    UserError.Log.e(TAG, "Could not write firmware info: " + throwable);
                                    resetFirmwareState(false);
                                });
                                firmware.nextSequence();
                                break;
                            }
                            break;
                        }
                    case OperationCodes.COMMAND_FIRMWARE_START_DATA:
                        {
                            sendFirmwareData();
                            break;
                        }
                    case OperationCodes.COMMAND_FIRMWARE_CHECKSUM:
                        {
                            firmware.nextSequence();
                            if (firmware.getFirmwareType() == FirmwareOperations.FirmwareType.FIRMWARE) {
                            // send reboot
                            } else {
                                UserError.Log.e(TAG, "Watch Face has been installed successfully");
                                resetFirmwareState(true);
                            }
                            break;
                        }
                    case OperationCodes.COMMAND_FIRMWARE_REBOOT:
                        {
                            UserError.Log.e(TAG, "Reboot command successfully sent.");
                            resetFirmwareState(true);
                            break;
                        }
                    default:
                        {
                            resetFirmwareState(false, "Unexpected response during firmware update");
                        }
                }
            } catch (Exception ex) {
                resetFirmwareState(false);
            }
        } else {
            String errorMessage = null;
            Boolean sendBGNotification = false;
            if (value[2] == OperationCodes.LOW_BATTERY_ERROR) {
                errorMessage = "Cannot upload watchface, low battery, please charge device";
                sendBGNotification = true;
            } else if (value[2] == OperationCodes.TIMER_RUNNING) {
                errorMessage = "Cannot upload watchface, timer running on band";
            } else if (value[2] == OperationCodes.ON_CALL) {
                errorMessage = "Cannot upload watchface, call in progress";
            } else {
                errorMessage = "Unexpected notification during firmware update:" + JoH.bytesToHex(value);
            }
            resetFirmwareState(false, errorMessage);
            if (sendBGNotification) {
                emptyQueue();
                JoH.startService(MiBandService.class, "function", "update_bg_as_notification");
                changeState(SLEEP);
            }
        }
    }
}
Also used : AUTHORIZE_FAILED(com.eveningoutpost.dexdrip.watch.miband.MiBandService.MiBandState.AUTHORIZE_FAILED) AUTH_REQUEST_RANDOM_AUTH_NUMBER(com.eveningoutpost.dexdrip.watch.miband.message.OperationCodes.AUTH_REQUEST_RANDOM_AUTH_NUMBER) AuthMessages(com.eveningoutpost.dexdrip.watch.miband.message.AuthMessages) Arrays(java.util.Arrays) com.eveningoutpost.dexdrip.xdrip(com.eveningoutpost.dexdrip.xdrip) Date(java.util.Date) TimeoutException(java.util.concurrent.TimeoutException) PendingIntent(android.app.PendingIntent) CLOSED(com.eveningoutpost.dexdrip.Services.JamBaseBluetoothSequencer.BaseState.CLOSED) INIT(com.eveningoutpost.dexdrip.Services.JamBaseBluetoothSequencer.BaseState.INIT) Inevitable(com.eveningoutpost.dexdrip.UtilityModels.Inevitable) BleCannotSetCharacteristicNotificationException(com.polidea.rxandroidble2.exceptions.BleCannotSetCharacteristicNotificationException) PowerManager(android.os.PowerManager) HeartRate(com.eveningoutpost.dexdrip.Models.HeartRate) StatusItem(com.eveningoutpost.dexdrip.UtilityModels.StatusItem) BleCharacteristicNotFoundException(com.polidea.rxandroidble2.exceptions.BleCharacteristicNotFoundException) COMMAND_ACK_FIND_PHONE_IN_PROGRESS(com.eveningoutpost.dexdrip.watch.miband.message.OperationCodes.COMMAND_ACK_FIND_PHONE_IN_PROGRESS) AUTH_FAIL(com.eveningoutpost.dexdrip.watch.miband.message.OperationCodes.AUTH_FAIL) Schedulers(io.reactivex.schedulers.Schedulers) AUTH_MIBAND4_CODE_FAIL(com.eveningoutpost.dexdrip.watch.miband.message.OperationCodes.AUTH_MIBAND4_CODE_FAIL) AUTH_RESPONSE(com.eveningoutpost.dexdrip.watch.miband.message.OperationCodes.AUTH_RESPONSE) AUTH_SEND_KEY(com.eveningoutpost.dexdrip.watch.miband.message.OperationCodes.AUTH_SEND_KEY) ActiveBgAlert(com.eveningoutpost.dexdrip.Models.ActiveBgAlert) FeaturesControllMessage(com.eveningoutpost.dexdrip.watch.miband.message.FeaturesControllMessage) MIBAND_NOTIFY_TYPE_ALARM(com.eveningoutpost.dexdrip.watch.miband.Const.MIBAND_NOTIFY_TYPE_ALARM) CLOSE(com.eveningoutpost.dexdrip.Services.JamBaseBluetoothSequencer.BaseState.CLOSE) BgReading(com.eveningoutpost.dexdrip.Models.BgReading) PrefBindingFactory(com.eveningoutpost.dexdrip.watch.PrefBindingFactory) UUID(java.util.UUID) JoH.getResourceURI(com.eveningoutpost.dexdrip.Models.JoH.getResourceURI) UNKNOWN(com.eveningoutpost.dexdrip.watch.miband.MiBand.MiBandType.UNKNOWN) JoH(com.eveningoutpost.dexdrip.Models.JoH) List(java.util.List) BleDisconnectedException(com.polidea.rxandroidble2.exceptions.BleDisconnectedException) JoH.bytesToHex(com.eveningoutpost.dexdrip.Models.JoH.bytesToHex) MIBAND_NOTIFY_TYPE_CANCEL(com.eveningoutpost.dexdrip.watch.miband.Const.MIBAND_NOTIFY_TYPE_CANCEL) R(com.eveningoutpost.dexdrip.R) Subscription(com.eveningoutpost.dexdrip.utils.bt.Subscription) PREFERRED_MTU_SIZE(com.eveningoutpost.dexdrip.watch.miband.Const.PREFERRED_MTU_SIZE) AlertLevelMessage(com.eveningoutpost.dexdrip.watch.miband.message.AlertLevelMessage) JoH.msTill(com.eveningoutpost.dexdrip.Models.JoH.msTill) AUTH_SUCCESS(com.eveningoutpost.dexdrip.watch.miband.message.OperationCodes.AUTH_SUCCESS) Getter(lombok.Getter) BluetoothGattCharacteristic(android.bluetooth.BluetoothGattCharacteristic) WakeLockTrampoline(com.eveningoutpost.dexdrip.utils.framework.WakeLockTrampoline) Constants(com.eveningoutpost.dexdrip.UtilityModels.Constants) AUTH_SEND_ENCRYPTED_AUTH_NUMBER(com.eveningoutpost.dexdrip.watch.miband.message.OperationCodes.AUTH_SEND_ENCRYPTED_AUTH_NUMBER) Pair(android.util.Pair) FirmwareOperations(com.eveningoutpost.dexdrip.watch.miband.Firmware.FirmwareOperations) DisplayControllMessageMiband3_4(com.eveningoutpost.dexdrip.watch.miband.message.DisplayControllMessageMiband3_4) RxBleConnection(com.polidea.rxandroidble2.RxBleConnection) Intent(android.content.Intent) MediaPlayer(android.media.MediaPlayer) ArrayList(java.util.ArrayList) JoH.niceTimeScalar(com.eveningoutpost.dexdrip.Models.JoH.niceTimeScalar) SuppressLint(android.annotation.SuppressLint) Calendar(java.util.Calendar) DeviceEvent(com.eveningoutpost.dexdrip.watch.miband.message.DeviceEvent) DisplayControllMessageMiBand2(com.eveningoutpost.dexdrip.watch.miband.message.DisplayControllMessageMiBand2) DisplayControllMessage(com.eveningoutpost.dexdrip.watch.miband.message.DisplayControllMessage) COMMAND_DISABLE_CALL(com.eveningoutpost.dexdrip.watch.miband.message.OperationCodes.COMMAND_DISABLE_CALL) JamBaseBluetoothSequencer(com.eveningoutpost.dexdrip.Services.JamBaseBluetoothSequencer) AlertMessage(com.eveningoutpost.dexdrip.watch.miband.message.AlertMessage) MI_BAND4(com.eveningoutpost.dexdrip.watch.miband.MiBand.MiBandType.MI_BAND4) Sheduled(com.eveningoutpost.dexdrip.watch.miband.message.DisplayControllMessageMiband3_4.NightMode.Sheduled) RxBleDeviceServices(com.polidea.rxandroidble2.RxBleDeviceServices) MI_BAND2(com.eveningoutpost.dexdrip.watch.miband.MiBand.MiBandType.MI_BAND2) JoH.emptyString(com.eveningoutpost.dexdrip.Models.JoH.emptyString) SLEEP(com.eveningoutpost.dexdrip.Services.JamBaseBluetoothSequencer.BaseState.SLEEP) BluetoothGattService(android.bluetooth.BluetoothGattService) com.eveningoutpost.dexdrip.xdrip.gs(com.eveningoutpost.dexdrip.xdrip.gs) AUTH_MIBAND4_FAIL(com.eveningoutpost.dexdrip.watch.miband.message.OperationCodes.AUTH_MIBAND4_FAIL) WatchFaceGenerator(com.eveningoutpost.dexdrip.watch.miband.Firmware.WatchFaceGenerator) AlertPlayer(com.eveningoutpost.dexdrip.UtilityModels.AlertPlayer) PoorMansConcurrentLinkedDeque(com.eveningoutpost.dexdrip.utils.framework.PoorMansConcurrentLinkedDeque) TimeUnit(java.util.concurrent.TimeUnit) MIBAND_NOTIFY_TYPE_MESSAGE(com.eveningoutpost.dexdrip.watch.miband.Const.MIBAND_NOTIFY_TYPE_MESSAGE) OperationCodes(com.eveningoutpost.dexdrip.watch.miband.message.OperationCodes) UserError(com.eveningoutpost.dexdrip.Models.UserError) MIBAND_NOTIFY_TYPE_CALL(com.eveningoutpost.dexdrip.watch.miband.Const.MIBAND_NOTIFY_TYPE_CALL) FirmwareOperations(com.eveningoutpost.dexdrip.watch.miband.Firmware.FirmwareOperations) DisplayControllMessageMiband3_4(com.eveningoutpost.dexdrip.watch.miband.message.DisplayControllMessageMiband3_4) Calendar(java.util.Calendar) RxBleConnection(com.polidea.rxandroidble2.RxBleConnection) JoH.emptyString(com.eveningoutpost.dexdrip.Models.JoH.emptyString) Date(java.util.Date) TimeoutException(java.util.concurrent.TimeoutException) BleCannotSetCharacteristicNotificationException(com.polidea.rxandroidble2.exceptions.BleCannotSetCharacteristicNotificationException) BleCharacteristicNotFoundException(com.polidea.rxandroidble2.exceptions.BleCharacteristicNotFoundException) BleDisconnectedException(com.polidea.rxandroidble2.exceptions.BleDisconnectedException) SuppressLint(android.annotation.SuppressLint)

Aggregations

SuppressLint (android.annotation.SuppressLint)2 PendingIntent (android.app.PendingIntent)2 BluetoothGattCharacteristic (android.bluetooth.BluetoothGattCharacteristic)2 BluetoothGattService (android.bluetooth.BluetoothGattService)2 Intent (android.content.Intent)2 MediaPlayer (android.media.MediaPlayer)2 PowerManager (android.os.PowerManager)2 Pair (android.util.Pair)2 ActiveBgAlert (com.eveningoutpost.dexdrip.Models.ActiveBgAlert)2 BgReading (com.eveningoutpost.dexdrip.Models.BgReading)2 HeartRate (com.eveningoutpost.dexdrip.Models.HeartRate)2 JoH (com.eveningoutpost.dexdrip.Models.JoH)2 JoH.bytesToHex (com.eveningoutpost.dexdrip.Models.JoH.bytesToHex)2 JoH.emptyString (com.eveningoutpost.dexdrip.Models.JoH.emptyString)2 JoH.getResourceURI (com.eveningoutpost.dexdrip.Models.JoH.getResourceURI)2 JoH.msTill (com.eveningoutpost.dexdrip.Models.JoH.msTill)2 JoH.niceTimeScalar (com.eveningoutpost.dexdrip.Models.JoH.niceTimeScalar)2 UserError (com.eveningoutpost.dexdrip.Models.UserError)2 R (com.eveningoutpost.dexdrip.R)2 JamBaseBluetoothSequencer (com.eveningoutpost.dexdrip.Services.JamBaseBluetoothSequencer)2