Skip to main content

Android 13 adds native support for flashlight brightness, here’s how it works [Video]

For years now, iPhones and even Samsung’s Android smartphones have supported the ability to adjust the brightness of the LED flashlight on the back of your phone. Now, in Android 13, Google is finally delivering this ability to adjust flashlight brightness natively, and we’ve been able to try it out.

Google has added two new APIs to Android 13. “getTorchStrengthLevel” and “turnOnTorchWithStrengthLevel” fall under the “CameraManager” class and enable both the system and apps to control the flashlight at various levels. That’s in contrast to how things used to be, with Android only allowing for an on/off toggle.

This functionality is already live and working in Android 13, and our Dylan Roussel was able to work up a quick demo to show it in action on a Pixel 6 (courtesy of Damien Wilde, who was running the preview on his Pixel 6). In his basic demo app, we can change the intensity of the flashlight according to a slider, with “0” turning the flashlight off entirely in our demo. A more fleshed-out implementation of this could offer an actual toggle alongside the slider.

As it stands today, Android 13’s native flashlight toggle is still just that, an on/off toggle. But it’s not hard to imagine that, in the future, Google will allow the brightness to be adjusted on this toggle. Samsung implements that option using a long-press of the toggle in its quick settings menu.

As the folks over at Esper point out, though, this might not work on all devices running Android 13. “CameraCharacteristics.FLASH_INFO_STRENGTH_MAXIMUM_LEVEL” determines the highest setting the flashlight can be set to, in turn also determining how granular the setting can be.

In practice, here’s what that means. If a device only has a maximum level of “1,” then it would only work as an on/off toggle instead of controlling brightness, whereas a device with a maximum level of “128,” such as the Pixel 6 Pro, would support many levels of brightness control. Another device with a maximum level of “10” would hit the same maximum brightness as the device with 128, but it wouldn’t feature same granular level of control, with bigger jumps between each brightness setting. Samsung, notably, only supports 5 levels of brightness on devices such as the Galaxy S22+.

Notably, the Pixel 6 and Pixel 6 Pro have HAL (hardware abstraction layer) support for these new APIs in place in the Android 13 Developer Preview, but we weren’t able to use our test app on the Pixel 5 or Pixel 4 XL because those devices lack support. Version 3.8 of ICameraDevice is needed to support this feature in Android 13.

Unfortunately, this needed upgrade probably means that many devices being upgraded to Android 13 won’t support changing the brightness of the flashlight, as updating “ICameraDevice” is not something Google currently requires. Devices launching with Android 13, though, will support the feature and it’s entirely possible that Google will add support on Pixels being upgraded to Android 13 (Pixel 4 and newer).

Dylan Roussel and Damien Wilde contributed to this article

More on Android 13:

FTC: We use income earning auto affiliate links. More.

You’re reading 9to5Google — experts who break news about Google and its surrounding ecosystem, day after day. Be sure to check out our homepage for all the latest news, and follow 9to5Google on Twitter, Facebook, and LinkedIn to stay in the loop. Don’t know where to start? Check out our exclusive stories, reviews, how-tos, and subscribe to our YouTube channel

Comments

Author

Avatar for Ben Schoon Ben Schoon

Ben is a Senior Editor for 9to5Google.

Find him on Twitter @NexusBen. Send tips to schoon@9to5g.com or encrypted to benschoon@protonmail.com.