private void showImportantDialogs() {
    // No Bluetooth connectivity in device?
    if (!BluetoothIntegration.isBLESupported(this)) {
      // Show fatal dialog
      BluetoothDialogs.showBLENotSupportedDialog(this);

      // Avoid duplicate dialog
      return;
    }

    // Bluetooth disabled?
    if (!BluetoothIntegration.isBluetoothEnabled()) {
      // Ask user to enable bluetooth politely
      BluetoothDialogs.showEnableBluetoothDialog(this);
    }
  }
Exemple #2
0
  void showImportantDialogs() {
    // Do we need to register for GCM or Pushy?
    if (!GCMRegistration.isRegistered(this) || !PushyRegistration.isRegistered(this)) {
      // Register async
      new RegisterPushAsync().execute();

      // Avoid duplicate dialogs
      return;
    }

    // Did we enable a device integration but Bluetooth is disabled?
    if (BluetoothIntegration.isIntegrationEnabled(this)
        && !BluetoothIntegration.isBluetoothEnabled()) {
      // Ask user politely to enable Bluetooth
      BluetoothDialogs.showEnableBluetoothDialog(this);

      // Avoid duplicate dialogs
      return;
    }

    // Check for updates
    initializeUpdateChecker();
  }