Android 13 May Finally Let Users Control the Flashlight Level on Their Phones


Early last month, Google announced the first development preview version of the upcoming Android version, Android 13, which brought with it many new features, both at the system interface level and in application programming interfaces, to enable users to customize the Android experience on their devices more freely, and providing new possibilities for developers to create and develop innovative applications and services to enrich the users' experience and make their lives easier. 

Among the many APIs in Android 13, Mishaal Rahman from esper, discovered that the next version of Android has two new APIs getTorchStrengthLevel and turnOnTorchWithStrengthLevel. The first API returns the LED flash brightness level, while the second one sets the flash brightness level LED from a minimum of ‘1’ to a maximum determined by the device hardware. 

These two APIs can be exploited by developers to create apps that control flash brightness level in Android smartphones, while previously, apps could only turn the flashlight on or off using the setTorchMode API. 


However, not all devices running Android 13 will be able to get this feature, as it requires an update of the Camera Hardware Abstraction Layer (HAL) to version 3.8.  

Although this sounds simple, manufacturers may not update HAL for their devices since Google allows them to freeze the version of HAL for up to three generations from the Android version that the device comes with, under what is called “the Google Requirements Freeze program”. 

To make it more clear, suppose that a company releases a phone with Android 11 and HAL version 3.7, this company will be able to release Android 12, 13, and 14 updates for the phone without the need to update the HAL to a higher version (necessarily, it can update it, But it is not forced to do so), which means, for example, that this phone will not support the flash level control feature that we are talking about here, although it will receive an update to Android 13 and even Android 14. 


It is not yet clear which of the current Android phones will support this feature, but most likely, phone manufacturers will update the HAL on their flagship phones released this year at least (if desired) to support Flash control. 

Finally, it should be noted that the flash level control feature, unlike Android, is not something new for iPhone owners, as Apple has integrated it into its devices since the first versions of its mobile operating system, iOS. 

Post a Comment

Previous Post Next Post