by Patrick Corgan
𝘉𝘺 𝘗𝘢𝘵𝘳𝘪𝘤𝘬 𝘊𝘰𝘳𝘨𝘢𝘯
An example of how to programmatically get and set the flashlight brightness.
Tested on Samsung Galaxy J7 on Android 8.1. Other brands and versions may have different valid values for brightness; these can be set in the 'brightness' variable in block 4. If you change to the variable, keep in mind that the keys should be incremented and continuous starting at 1; and the values should be in order of least bright starting at key 1, getting brighter as the keys get higher. If the 'brightness' variable is set up correctly, the rest of the flow will take care of itself.
⚡𝘊𝘰𝘯𝘴𝘵𝘳𝘶𝘤𝘵𝘪𝘷𝘦 𝘤𝘰𝘮𝘮𝘦𝘯𝘵𝘴 𝘢𝘯𝘥 𝘤𝘳𝘪𝘵𝘪𝘤𝘪𝘴𝘮𝘴 𝘢𝘳𝘦 𝘢𝘭𝘸𝘢𝘺𝘴 𝘸𝘦𝘭𝘤𝘰𝘮𝘦. 𝘛𝘩𝘢𝘯𝘬 𝘺𝘰𝘶!⚡