Skip to content

Error when using your code in my login component #1

Description

@tarunmehta-quovantis

Error is
Calling startActivity() from outside of an activity context requires the flat_activity_new_task flag. is this really what you want ?

Device : oneplus
Os: 9 (Pie)

I have called this in my constructor..

constructor(props) {
    super(props);
    this.passwordRef = React.createRef();
    this.state = {
      userName: '',
      password: '',
      loading: false,
      valid: '',
      type: '',
      value: '',
      shouldLoadProfile: false,
      startProgramDate: this.props.userAccountStore.programStartDate
    };
    this.updateInfo = this.updateInfo.bind(this);
    this.localNotification = new LocalNotification();
    this.scheduleLocalNotification = this.scheduleLocalNotification.bind(this);
    this.askForBatteryOptimizationCondition();
  }

  askForBatteryOptimizationCondition() {
    RNDisableBatteryOptimizations.isBatteryOptimizationEnabled().then(
      isEnabled => {
        if (isEnabled) {
          RNDisableBatteryOptimizations.openBatteryModal();
        }
      }
    );
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions