[APP][ONEUI4] Flashlight as keycombo

Search This thread

3arthur6

Senior Member
Sep 15, 2011
574
1,012

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: 155
Last edited:

neneezatch

Member
Nov 15, 2009
9
0
Thanks,
I have used this on my S22 with Android 13 and it worked even with screen off. But now I upgraded to Android 14 and it no longer works with screen off - There was some special setting to achieve that, but I can't remember where... Can you help me?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 4

    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