Closed abdelaziz-mahdy closed 2 years ago
May you test is this work for you with:
screen_brightness:
git:
url: https://github.com/aaassseee/screen_brightness
ref: feature/support_miui
thank you I don't get the error anymore now
is there a way to listen for device brightness changes?
and don't know if that was intended or not, but when the brightness is changed in the app it ignores the device brightness (cant change brightness of the screen)
for example if I wanted to change volume of the device It changes the inside and outside the app (global on all of the device) is there is a way to make brightness global?
If you are talking about the behavior of changing the brightness will not affect the system setting. That's true. Because there ain't any ways to change setting on iOS.
If you hoping for changing the system settings with screen brightness on Android. That is a different way to implement. Users needs to provide the permission of writing setting. Moreover, it can't find the initial value because you are overriding system setting value instead of application level brightness value.
If you really need that, I can write a function which will only work on Android.
If you are talking about the initial brightness won't change when the application in background mode and user changed the system brightness.
I am working on the solution with the initial brightness that stored in the plugin didn't updated when user change. Monitoring initial brightness changes on Android isn't very complicated. However in iOS that would be a challenge.
Version 0.0.4 is out. You can update it in with fixing this issue
Thanks will update to it
And for the global value I thought it will be better for the value to be local to avoid messing with the user brightness in another applications
Do you mean you are satisfied with current flow?
yes since i found out that popular apps do it the same way like mxplayer
when ever the user exists the videoPlayer the brightness goes back to system
OK, thanks again for reporting this issue. I am closing it, feel free to reopen this issue if you have further problems on Miui
Version 0.1.1 still has this issue on OnePlus and MiUi
Hi @cnting, could you post the error log for further studies?
And what device model are you using when you get this error?
error log: ` RangeError: Invalid value: Not in inclusive range 0..1: 2.2941176891326904
`
bug report from umeng: (1)ONEPLUS A6000 with Android10 (2)Redmi with Android11
Hi @cnting, Would like to do me a favour. Use another feature branch to test is it working with your phones. Because I didn't have any ONEPLUS or Redmi.
screen_brightness:
git:
url: https://github.com/aaassseee/screen_brightness
ref: feature/maximum_brightness_with_power_manager
Sorry,the bug is report from umeng,I can't test
I had borrowed my coworker's phone which is ONEPLUS A6003. And I have confirmed that this issue has been solved by different approach on getting maximum brightness
Please update to the latest version. If there are any problem, feel free to reopen this issue again
I/flutter (23765): RangeError: Invalid value: Not in inclusive range 0..1: 2.8392157554626465 I/flutter (23765): Failed to get current brightness
this happened when testing on pocophone f1 (and has android 10- Miui 12.0.3)