How to turn on the flashlight with a button press on Android

Install KeySnap, create a shortcut on a button such as Volume Down, set it to a double press and add the Toggle flashlight action. Double-press once to turn the flashlight on and again to turn it off. It needs no root and no camera permission.

Get KeySnap on Google PlayJump to the steps

Steps

  1. Install KeySnap and finish the setup on HomeOpen KeySnap and follow the setup steps on Home. They start with turning on the Accessibility service, which is how Android lets an app notice a hardware key.
    KeySnap setup, step 1 of 2: Turn on Accessibility, with what the service can and cannot do.
    Setup step 1: the Accessibility service.
  2. Create a shortcut on a keyTap + at the bottom of the screen. Next to Press, tap a key, then Record a key, and press Volume Down.
    KeySnap Choose a key sheet showing Listening, tap to stop, with a saved Volume Down key below.
    Listening for a key. Saved keys appear below.
  3. Set it to a double pressTap Single press and choose Double press.
    KeySnap editor with Press Volume Down and the press menu open: Single press, Double press, Long press.
    Tap the press pattern to change it.
  4. Add the flashlight actionUnder Do, tap Add action, open the Flashlight category and tap + next to Toggle flashlight.
    KeySnap Add action screen with the Flashlight category open: Toggle, Enable and Disable flashlight.
    The Flashlight category in Add action.
  5. Save and try itTap Save shortcut. Double-press Volume Down: the flashlight turns on. Double-press again to turn it off.
    Finished KeySnap shortcut: Press Volume Down, Double press, Only if Always runs, Do Toggle flashlight, and Save shortcut.
    A finished shortcut, ready to save.

You can also start from the Flashlight recipe in the gallery on Home: pick it, press the key you want, and it is ready.

Good to know

  • Screen off or locked: without Advanced Mode, Android decides which keys reach an accessibility service while the screen is off, so it varies by phone. With Advanced Mode, KeySnap reads key presses directly and works with the screen off.
  • No camera permission: KeySnap switches the flashlight through an Android API that needs no permission.
  • Turn it off by itself: the Torch Safety recipe turns the flashlight off when the screen turns off.
  • No spare button? The same shortcut can run from a home-screen widget or a Quick Settings tile.

Put the flashlight one press away.

KeySnap is free to install from Google Play. It offers in-app purchases.

Get KeySnap on Google PlayRemap the volume buttons

KeySnap is an independent app by Arda Şen. It is not affiliated with Google or any phone manufacturer.