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();
}
}
);
}
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..