1

I knew that brightness seekbars go from 0 to 100, and screen brightness goes from 0 to 255. But I just found out that some devices (maybe most) don't change from seekbar value to real value linearly but more like exponentially.

For example on the Razer Phone 2 when the seekbar is set to 3% the brightness is set to 3. And when the seekbar is set to 100% the brightness is set to 255.

To make a brightness app I'd have to figure out the equation to use to transform from seekbar value to brightness, and that's just for this device. I have no idea what equation other devices use.

This problem can be overcome by making a seekbar with values from 0 to 255. But I guess choosing precise values from such a seekbar would be very difficult, even for a user with tiny fingers, which is why Android has always used brightness seekbars with Max values of 100.

My questions are:

1-Is the way seekbar translates to brightness dependant on API version? Or is it specific to each and every device and therefore hopeless?

2-If it's dependant on API version then is there an existing way I can translate seekbar to brightness?

Also sorry to pile up the questions but I read somewhere that your app can't detect brightness level if auto-brightness is enabled. Is this true? I can't try it on Android Studio emulator since devices there don't have auto-brightness. But I did try it on my Razer Phone 2 and the app was able to detect brightness level when auto-brightness is enabled.

Cardstdani
  • 4,999
  • 3
  • 12
  • 31
User104163
  • 532
  • 6
  • 17

0 Answers0