This is a bug question that does not support 6.0 when running an application that does not support Windows Manager on the 6.0 device.

Asked 1 years ago, Updated 1 years ago, 122 views

Currently, it does not support 6.0, and I am drawing one screen at the top through Window Manager. There was a problem when using this product on the 6.0 version terminal.

The build or target cannot be given to 6.0 because the product does not support 6.0. I gave the rights to SYSTEM_ALERT_WINDOW to MANIFEST Even though it is checked on the "Draw on top of other apps" setting screen, it will work normally when you open it and check it.

I can't draw it as a window manager because of number 1. Because 6.0 is not supported, the permission check function supported by 6.0 api is not available, and in previous versions of permission check api, Even if the "Draw on top of other apps" permission is not checked, it is true. (I think the permission check api before 6.0 is checking manifest.)

Please advise me if there is a good way to solve this problem. Changing the code is good, and a whole new idea is good.

Thank you.

android permissions system-alert-window

2022-09-22 13:06

1 Answers

There is a similar phenomenon in Stackoveflow, but there is no answer.

If we can't raise the target API to 6.0, we have no choice but to support the function in a limited way. Also, you said that the right to "draw another app" is always true in the second phenomenon you posted. Among the comments in the link below, we recommend that you solve problem 2 indirectly by using Exception.

Get the WindowManager and add/remove an invisible view: Successful -> Permission is granted. Exception: Permission is not granted.

If number 2 is resolved (when it is determined that the setting is off), it seems a good alternative to show the user a push to activate the setting and have them enter the "Draw on top of another app" setting, as shown in the following figure. (In fact, the best way would be to officially support 6.0)

Please refer to the link below for how to enter the "Draw on top of other apps" setting.

The overall flow to show the push and to the settings was referred to the link below. I think it would be helpful if you read it.


2022-09-22 13:06

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.