mvysny / photocloud-frame-slideshow

Android Digital Photo Frame
https://www.android-photo-frame.eu
14 stars 1 forks source link

Night mode enhancement #127

Closed gemfor closed 4 years ago

gemfor commented 4 years ago

I have an issue using the app on Lenovo M10 tablet in shared hospital room. I set night brightness to minimum but still there are complains about disturbing other people in the room during the night. I suggest adding one more step to brightness scale that would ideally switch the screen off completely or at least it will set brightness to minimum and keep playing all black picture (or mix the picture played with black) to reduce emitted light even more.

I know you have a plan to have some sort of night sleep mode, but I don't need full sleep. Just the emitted light is the issue.

Thanks

mvysny commented 4 years ago

There are settings regarding this, in photocloud settings / screen / brightness, and you can set the back light brightness to as low as 0. However I just tried that on my phone and it wouldn't work for some reason. Let me take a look at it.

mvysny commented 4 years ago

I just debugged the issue: PhotoCloud is setting WindowManager.LayoutParams.screenBrightness to 0f (0%) yet Android simply ignores that. Or, to be precise: setting the brightness to 1f (full 100%) works, setting the brightness to 0f (0%) doesn't work. As if only the increase of the brightness worked, but the decrease of the brightness wouldn't work :thinking: wtf android... investigating further.

mvysny commented 4 years ago

Reported as a bug to Android bug tracker, let's wait and see: https://issuetracker.google.com/issues/37822816

For me the following workaround worked:

  1. Go into your tablet's settings, display, and disable the adaptive brightness (or automatic brightness or similar).
  2. Then, still in the tablet's settings, display, set the brightness level to 0 (minimum).
  3. PhotoCloud should now be able to correctly control the brightness since it will always increase the brightness from the system settings baseline.

Could you please try out this workaround on your device and let me know whether it worked?

gemfor commented 4 years ago

Suggested workaround doesn't work on Lenovo M10 with Android 9 (tested both screensaver and normal mode). Could you please implement brightness control workaround by tweaking picture brightness / fade out and using black picture for 0%. I know it's not perfect for IPS screens but it will work great on OLED displays.

mvysny commented 4 years ago

Sure! You can set the background color to black via Settings / Slideshow / Photo Slideshow Background. I'll also implement the artificial picture dimming (you'll be able to pick from 0% dimming - no dimming to 100% - full dimming), it's actually easier than it sounds.

mvysny commented 4 years ago

Are you perhaps using Daydream? I just noticed that the brightness is not controlled during the Daydreaming. I'll fix that issue as well.

mvysny commented 4 years ago

Implemented in 1.13.17

gemfor commented 4 years ago

I'm using Daydream as well as normal mode. I will check 1.13.17 later today and will let you know.

mvysny commented 4 years ago

Ah, the release is not yet ready, but I'll push it out later this week.