I want to hide tap-jacking alerts in my Android app. I was able to do it on Android 12 and above by using getWindow().setHideOverlayWindows(true);. Can someone help me achieve this on versions below Android 12? Is there any alternative method to setHideOverlayWindows(true) for versions below Android 12?
I also added below property in xml's rootview.
android:filterTouchesWhenObscured="true"