Skip to content
This repository was archived by the owner on Oct 26, 2023. It is now read-only.
This repository was archived by the owner on Oct 26, 2023. It is now read-only.

Possible support for Android O #161

@DavideCannizzo

Description

@DavideCannizzo

Maybe this is not an issue, but, as a developer, I can suggest you a very simple workaround for the problem that Android O doesn't allow to create overlays on top of the status bar. Really, that's not true, even if the Android Developers website says it is. Indeed, I'm not sure whether it is a bug or an expected but undocumented (as far as I was able to find out on the Internet) behavior. However, if you create an AccessibilityService (no flags needed) and then you create an overlay with the usual WindowManager, with TYPE_ACCESSIBILITY_OVERLAY, with the proper flags in the WindowManager.LayoutParams from within the onServiceConnected method, you should be able to draw on top of the status bar. I'm actually doing it. And it is on top of the lock screen as well. And also on top of the ambient display! It looks like you have superpowers when using TYPE_ACCESSIBILITY_OVERLAY as a type for the overlay being created. It would be enough for you to use this type of overlay and eventually add an accessibility service to your app (I used it a long time ago and I don't remember whether it already uses an accessibility service or not) and maybe change some overlay flags. It's extremely easy. I'm actually developing an app to replace the system quick settings, which works just this way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions