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"
Before Android 12, there's only one permission android.permission.HIDE_NON_SYSTEM_OVERLAY_WINDOWS which is intended for system app.
so basicly there's no trivial way to do that