| Start |
|---|
| Popup overlay In order to put your view on top of every application, you have to assign your view to the corresponding window manager. For that you need the system alert permission, which can be requested by adding the following line to your manifest file: Note: If your application gets destroyed, your view will be removed from the window manager. Therefore, it is better to create the view and assign it to the window manager by a foreground service. Assigning a view to the WindowManagerYou can retrieve a window manager instance as follows: In order to define the position of your view, you have to create some layout parameters as follows: Now, you can assign your view together with the created layout parameters to the window manager instance as follows: Voila! Your view has been successfully placed on top of all other applications. Note: You view will not be put on top of the keyguard. |
| Granting SYSTEM_ALERT_WINDOW Permission on android 6.0 and above From android 6.0 this permission needs to grant dynamically, Throwing below permission denied error on 6.0, Solution :- Requesting Overlay permission as below, Check for the result, |
Read Article
https://develop.horje.com/learn/1434/reference