[APP][ONEUI4] Flashlight as keycombo

Search This thread

3arthur6

Senior Member
Sep 15, 2011
550
995
Samsung Galaxy S20


FlashlightAccessibilityService



I provide here this basic app to toggle flashlight from vol up + vol down and/or power + vol up.
It uses a new feature introduced with Android 12 to toggle accessibility services from these key combos.

  • How to use:
Install the app.
Go to Settings app, then Accessibility, and Advanced settings.
Select your key combo, then go down and select Activate flashlight.
Enjoy!

  • Requirements:
Since it is an Android 12 exclusive feature, this will only work on One UI 4.

To get a proper cohesion between this app and the quick setting flashlight tile.
You should consider, but it is not mandatory, to give WRITE_SECURE_SETTINGS permission to this app.
Here it is only used to read secure settings but we need the permission as well.
To do that, two choices:
Using ADB :​
adb shell pm grant com.android.flashlightaccessibilityservice android.permission.WRITE_SECURE_SETTINGS
Using terminal app (as Termux) :​
pm grant com.android.flashlightaccessibilityservice android.permission.WRITE_SECURE_SETTINGS

  • Changelog:
v1: Initial release
v1.1 : Drastic size reduction (removed unneeded dependencies + build optimisation)
v1.2 : Proper handling between the key combination and the quick setting torch tile
 

Attachments

  • FlashlightAccessibilityService_v1.2.apk
    78.7 KB · Views: 125
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 5


    FlashlightAccessibilityService



    I provide here this basic app to toggle flashlight from vol up + vol down and/or power + vol up.
    It uses a new feature introduced with Android 12 to toggle accessibility services from these key combos.

    • How to use:
    Install the app.
    Go to Settings app, then Accessibility, and Advanced settings.
    Select your key combo, then go down and select Activate flashlight.
    Enjoy!

    • Requirements:
    Since it is an Android 12 exclusive feature, this will only work on One UI 4.

    To get a proper cohesion between this app and the quick setting flashlight tile.
    You should consider, but it is not mandatory, to give WRITE_SECURE_SETTINGS permission to this app.
    Here it is only used to read secure settings but we need the permission as well.
    To do that, two choices:
    Using ADB :​
    adb shell pm grant com.android.flashlightaccessibilityservice android.permission.WRITE_SECURE_SETTINGS
    Using terminal app (as Termux) :​
    pm grant com.android.flashlightaccessibilityservice android.permission.WRITE_SECURE_SETTINGS

    • Changelog:
    v1: Initial release
    v1.1 : Drastic size reduction (removed unneeded dependencies + build optimisation)
    v1.2 : Proper handling between the key combination and the quick setting torch tile