Unable to click below overlay on Android 12

Viewed 315

I have an app called Migraine Relief: Green Dimmer on the play store. This app basically creates an overlay on top of all the apps with green color, which is known best for Migraine soothing. It works perfectly for anything below Android 12. But, since Android 12 it no longer works. I can still interact with my application, but once minimized I no longer can click on anything or change anything at all. I have to restart the device to close the application.

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
    {
        params = new WindowManager.LayoutParams(
                WindowManager.LayoutParams.MATCH_PARENT,
                WindowManager.LayoutParams.MATCH_PARENT,
                WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY,
                 FLAG_NOT_TOUCH_MODAL | FLAG_NOT_TOUCHABLE | FLAG_NOT_FOCUSABLE | FLAG_LAYOUT_IN_SCREEN ,
                PixelFormat.TRANSLUCENT);

    }

This is how I create the overlay on top. I checked the documentation, but could not find any information. I will be grateful if I can get any help and suggestions to fix this issue.

0 Answers
Related