You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 26, 2023. It is now read-only.
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.
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 usualWindowManager, withTYPE_ACCESSIBILITY_OVERLAY, with the proper flags in theWindowManager.LayoutParamsfrom within theonServiceConnectedmethod, 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 usingTYPE_ACCESSIBILITY_OVERLAYas 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.