Starting an app(activity) from power button

Is there an app for this (even with root)?
I want to program long-press power button on locked screen to start recording.
Audio Recorder has a direct way to start recording (.activity.RecordingActivity) but I don’t know how to program it with the power button (only on lock screen), any ideas? any app or script? Thanks.
LineageOS 17 has this feature but it only works for turning on flashlight.
I want this for proof of possible police abuse and so on.

Maybe look at Keyboard/Button Mapper. I guess this is want you want. You can also disable buttons like Google Assistant and re-map that.

1 Like

Thanks, this was helpful, unfortunately I can’t open a specific activity of an app (I think, I’ve checked it), like p.e. App Manager can do

Oh. Does the aufio rec app not support that?

Is there any recorder that you can configure to start recording just after open the app?

If you are running LineageOS I think you can just call the following intent:
org.lineageos.recorder.screen.ACTION_START_SCREENCAST

I guess it is in App Shortcuts -> Perform Actions.
App crashes when I tap there, even with root :pensive: