JonasBernard / FakeStandby

An Android app for turning the screen off while keeping apps running.
https://fakestandby.jonasbernard.de
GNU General Public License v3.0
424 stars 27 forks source link

Why does it need accessibility service? #37

Open Blocked opened 2 years ago

Blocked commented 2 years ago

Why is overlay service("Draw over other apps") permission not enough? Most apps can easily draw a blank screen over other apps with just this permission.

JonasBernard commented 2 years ago

This is because the app does not only draw over other apps but also prevents you from touching throught the overlay and accidentally interacting with the underlying app. To control such things like the touchscreen in such a powerful way you need to use an accessibility service.

Blocked commented 2 years ago

I think all apps that draw over other apps, prevent touch events from passing through the floating app. For eg,

https://github.com/termux/termux-float

Or vlc in older android versions(androids without Picture In Picture) used this permission to provide a floating player. Touches won't go through to the underlying app.

https://github.com/videolan/vlc-android/blob/5855fc645a177d7870b56f6f9b7768353798e7e3/application/vlc-android/AndroidManifest.xml#L24

Am I missing something?