screen_brightness icon indicating copy to clipboard operation
screen_brightness copied to clipboard

[bug] brightness value in iOS is always accurate, but Android is not

Open CillianMyles opened this issue 1 year ago • 6 comments

Description (bug summary)

My app is using the system brightness controls (previously the application controls) but I have observed on multiple iOS devices the value for brightness always seems accurate (compared to the OS), whereas on Android it seems like the plugin value and the OS value are off.

Step to reproduce (how to reproduce the bug)

iOS

https://github.com/user-attachments/assets/ff5ad5aa-f756-4642-8756-506872678eae

Android

https://github.com/user-attachments/assets/e98e92c5-aea9-4b48-981b-950191598e48

Platform (Android/iOS/macOS/Windows)

Notice how the OS and values from the plugin are aligned in iOS, but not Android, from the screen recordings above.

iPhone 12 - iOS 18

Google Pixel 6A - Android 14

I'll dig a little deeper if I get time, but my guess is it's something to do with the calculation of brightness vs max brightness on Android, but also please let me know if you need any more information from me.

And thanks for the great package! 🙏

CillianMyles avatar Oct 17 '24 22:10 CillianMyles

Hi @CillianMyles. Thanks for reporting this problem with video. I will check it later too.

aaassseee avatar Oct 17 '24 22:10 aaassseee

Hi @CillianMyles. Thanks for reporting this problem with video. I will check it later too.

Let me know if you need minimal repro sample, but the above just makes use of onSystemScreenBrightnessChanged and setSystemScreenBrightness (pretty straightforward).

CillianMyles avatar Oct 17 '24 22:10 CillianMyles

found that the maximum brightness is not match with the system setting bar will dig deep to the Android code

aaassseee avatar Oct 20 '24 15:10 aaassseee

Hey @aaassseee

Wondering if you had any luck with this? Or if there is anything I can do to help?

CillianMyles avatar Dec 20 '24 09:12 CillianMyles

@CillianMyles I had research this issue for a week but with no luck The main reason of this issue is, the maximum brightness on power service class is not as same as the setting slider.

aaassseee avatar Dec 20 '24 14:12 aaassseee

One more discover the maximum brightness on slider is 161 which is difference from default, 255.

aaassseee avatar Dec 22 '24 06:12 aaassseee