Background
SAW (system alert window) permission can be used to draw content on top of other apps.
I was told a very long time ago that accessibility service can do this too, but I never found any tutorial, sample, documentation and even an app that does it... until recently:
https://play.google.com/store/apps/details?id=com.github.ericytsang.screenfilter.app.android
In fact, this app seems to be able to draw everywhere, as opposed to SAW permission. It draws even on top of the settings app and system dialogs, while SAW permission isn't allowed as such.
The problem
Sadly, as accessibility is quite a unique and rarely thing to use, just as I wrote, I couldn't find how such a thing works with drawing on top of other apps.
What I've found
The only thing I know is that this app somehow does it, and this is what it shows when it asks to grant it:
But that's not enough. I know that for some old POC I've made of using accessibility service, it showed the same, and checking it out, I can't see what triggers it. Pretty sure it's the minimal thing the users will see for any kind of accessibility service, so this won't help.
The questions
-
How does AccessibilityService draw on top of other apps?
-
Does it work the same as SAW permission ? Can you, for example, handle touch events on what it draws?
-
What are the restrictions of using it, if there are any ?
from How does AccessibilityService draw on top of other apps?

No comments:
Post a Comment