screen_brightness icon indicating copy to clipboard operation
screen_brightness copied to clipboard

[bug] App brightness doesn't work neither on real device (Android) nor in emulator

Open remarkked opened this issue 9 months ago • 9 comments

System brightness work OK both on real Android device and emulator. Application brightness doesn't work anywhere. Future is returning the value, the slider works but visual brightness doesn't change.

Step to reproduce (how to reproduce the bug)

  1. Run the example

Platform (Android/iOS/macOS/Windows)

Android 10

Logs [empty]

remarkked avatar Mar 06 '25 04:03 remarkked

@remarkked What is you real device model. Are there any video or logs to let me trace your issue? It works for me.

aaassseee avatar Mar 06 '25 16:03 aaassseee

@aaassseee sorry for late response, the device is Teyes CC3 2K (car unit, API 30), the emulator device I tested is Pixel 6 API 31. Logs are empty, no errors shown. Same result with example app.

remarkked avatar Sep 25 '25 06:09 remarkked

Emulator didn't work for sure, but your physical device should work. Can you take a video about the issue? You can use the sample app if you need to not show something you don't want to.

aaassseee avatar Sep 25 '25 11:09 aaassseee

@aaassseee it only throws "Failed to set system brightness" if has no permission and is silent if trying to change application brightness. The release version is on video, debug behaves the same

https://github.com/user-attachments/assets/768398ae-0db1-41c3-ab4b-6dd467bd2dcf

remarkked avatar Sep 30 '25 06:09 remarkked

@remarkked The video cannot play. Can confirm that is the permission for changing system setting is still not grant yet?

aaassseee avatar Oct 02 '25 11:10 aaassseee

@aaassseee the error's thrown only if trying to change system brightness without permission and after that system brightness works OK. App brightness doesn't require this permission and doesn't work neither with nor without the permission and throws no errors

btw that's strange why the video's not playing. I checked this thread from my phone, everything is ok

remarkked avatar Oct 03 '25 11:10 remarkked

@aaassseee I can confirm that application brightness works for Samsung S25 (API 35) and Redmi Note 11 (API 31). Seems it's 30 and lower APIs (or idk, device-specific?) issue only

remarkked avatar Oct 03 '25 11:10 remarkked

@remarkked Are there any Android log for the not working devices?

aaassseee avatar Oct 07 '25 09:10 aaassseee

@aaassseee tried to find logs by keywords "bright", "failed", "error", "androidview", "flutter" etc. Nothing related to the problem

remarkked avatar Oct 10 '25 05:10 remarkked