cyb3rko / flashdim

Modern flashlight app with dim functionality on Android 13+
Apache License 2.0
521 stars 20 forks source link

Quick access via double backtap #21

Closed piebaker closed 10 months ago

piebaker commented 1 year ago

It would be great to have a quick access button for dimming. Press once for minimum, again for half, then full, off, etc. Would also be great to get it as a quick-tap setting for the pixel 7, maybe the double tap loads a preset user-defined brightness level?

cyb3rko commented 1 year ago

The quick settings tile already exists.

Implementing the 4-step dimmer into quick settings could be possible.

But overriding the double tap on P7 with Android 13 is currently not possible I think.

If you have ideas how to implement it, please let me know :)

piebaker commented 1 year ago

Oh sweet, hadn't noticed it till now. The 4-step dim would be great to see as quick settings tile. It appears the double tap uses a CHRE nanoapp that is native to the pixel line? (Info on it seems to be quite sparse) Antenna pod uses the backtapp gesture to open the app, refresh or launch straight into various options. Personally I'm currently using the backtapp to open straight to flashdim

cyb3rko commented 1 year ago

Thanks for the links, didn't know you could detect the double tap signal.
How can you activate the double tab feature for Antenna pod? Didn't found it.

Also let's split the 4-step dim and the backtap feature into multiple issues.
Do you mind opening another one specificially for the 4-step dim? :)

piebaker commented 1 year ago

Not sure myself, I'll see if I can do some looking into it. It may be worth lodging an issue with the antenna pod guys to figure out their technique. I'll open up a new issue for the 4-part dim switch also

cyb3rko commented 1 year ago

I think you misunderstood, it's not about how to implement it.

I rather would like to know how to use the tap feature in the Antenna pod app.

piebaker commented 1 year ago

Ah, I've included a screenshot of how it is used on my pixel 7. It is an option within the phone settings to open an app with the quick tap, and then antenna pod has options to open to a specific part of the app.

cyb3rko commented 1 year ago

I get it now how it's working.

You can configure app shortcuts to be executed on quick tapping.

So I would just need to add these shortcuts. I'm thinking of Off, Minimum, Half, Maximum, Initial Level.

piebaker commented 1 year ago

Awesome! Those shortcuts seem great also. Would it be possible to get a cycle shortcut to cycle between each of those modes?

cyb3rko commented 10 months ago

Shortcuts are now available in Version 2.3.0.
With my effort to keep it as simple as possible. at the moment there are the options "Minimum", "Half" and "Maximum".