guys. I'm developing a applock application, when the service listen a locked app, it will use WindowManager to call addView() to add a gesture lock view. However, it doesn't work on MIUI System. And I find the reason is that when the service add a view, the MIUI system will remove the view so that I can't lock any app. I hope someone can help me, thanks!
Asked
Active
Viewed 331 times
2 Answers
5
MiUI doesnt allow to add view due to its internal security. To solve your problem, go to App Setting > App > Calley > Permission Manager > Display Popup Window > Allow
But this is manual way to allow add view method. You need to set it through code. Hope this helps you.

devendrant
- 451
- 3
- 10
0
use WindowManager.LayoutParams.TYPE_TOAST, if you check android source code, you will find that when you using this type, there is no permission check.

Shaw
- 1,445
- 16
- 21