In Android, View can be floating upon any activities, when they have the permission android.permission.SYSTEM_ALERT_WINDOW. Virus can use this feature to do many things they want. SO, is there a way to detect these view on my foreground application? thanks!
Asked
Active
Viewed 198 times
1 Answers
0
is there a way to detect these view on my foreground application?
Not really.
By default, on newer versions of Android (4.0+ IIRC), touch events are either consumed by such views or cannot be seen by those views via callback methods. Earlier versions of Android supported such a floating view both finding out about touch events and allowing them to pass along to underlying activities, referred to as a "tapjacking" attack. For API Level 9+, you can use android:filterTouchesWhenObscured
to control this behavior.

CommonsWare
- 986,068
- 189
- 2,389
- 2,491