Using BrightnessTools, Can I use a Double-touch to blackout and view the screen?

My serial OTG app needs to run in the foreground continuously.

I’m currently using a playstore app that blacks out the screen with a touch of a green circle, and wakes screen with a double-touch.(has no permission pop-ups of course). I wan’t to build this feature into my app.

Will BrightnessTools allow me to do this?
I thought I saw an example of this during my searches, but lost it.

Hi dear,
Welcome to the Kodular community!

have you tried taking a look at itoo?