Ali1Ammar/optimization_battery

Calling startActivity() from outside of an Activity

Closed this issue · 2 comments

Unable to open the battery settings. it throws this error

[ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: PlatformException(error, Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?, null, android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?

hii
could you test if this this branch acitivityaware solve the bugs

Hi,
tested with the branch and it works fine without any issues.
Thanks for resolving this.