Pavlin Petkov
Pavlin Petkov

Reputation: 1142

How to know if overlay is used on top of my android app?

Lets say I have an application MyApp. Is there a way for me to check if another app is using overlay on top of my application and then be like Hey yo....no overlay of my app allowed!

So far when I google detect overlay in an app I get tips on how to manually disable overlay over all or fix some overlay issues people have.

To clarify - I am not asking about checking if my app has permissions to draw over other apps...but for a way for my app to block other apps from using overlay over it... or if not block them then to be unusable until the overlay is turned off.

Upvotes: 2

Views: 1910

Answers (1)

Prashant Abdare
Prashant Abdare

Reputation: 2475

Views in the overlay are visual-only; they do not receive input events and do not participate in focus traversal. Overlay views are intended to be transient, such as might be needed by a temporary animation effect.

Due to this your app might never detect that there are Overlays on it until and unless it is generated from same parent.

Google Documentation.

Upvotes: 2

Related Questions