In android oreo, I can't use WindowManager.LayoutParams.TYPE_SYSTEM_ERROR
anymore and must use WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY
instead. The drawback is, that this mode does not draw over the statusbar.
Is there anyway to achieve the old behaviour and be able to draw over the statusbar as well? I've a sidebar app and until now, I allowed the user to have trigger areas on top of the screen as well, which does not work anymore now, because the status bar is overlapping the touchable region on top now...
I'm interested in ANY solution, even if it's only for some devices, like rooted devices for example... As I think there is not normal solution for this problem because the android system does not allow this anymore as stated in the docs (https://developer.android.com/about/versions/oreo/android-8.0-changes.html#o-apps). Still, this does not necessary mean that there is no alternative solution...
I m afraid you cant do that in android oreo as google stopped support for that to draw over notification line till date. May be in future they might think to implement that too as many developers are protesting against that.
For more details visit links below:
https://www.androidauthority.com/android-o-draw-over-system-763178/
https://www.reddit.com/r/Android/comments/64ffk1/android_o_is_breaking_apps_that_overlay_on_top_of/
Unfortunately, this is no longer possible...
Developers that utilize this feature have opened
bug
reports onAndroid’s Issue Tracker (#260787 and #36574245)
to protest the change and ask for an alternativeAPI
, but a Googler commented on thetracker
with the following statement:and there is only solution for this that you set your target
sdk
as 25The docs says that the flag is deprecated for non-system apps. Have you tried making the app a system app?
Here is how with ES File Explorer: