How to prevent Overlay/Floating Buttons from losing touch focus during active drag gestures in another app?
Hi everyone, I’m facing an issue with a floating button (overlay window) created via automation apps like MacroDroid on Android.
[What I want to achieve]: I want to tap a floating button while constantly dragging an on-screen joystick in a game (Unity-based) with my other hand.
[The Problem]: When the game screen is already actively receiving a continuous drag gesture (moving the joystick), any taps on the floating button are completely ignored. The touch event for the overlay seems to be dropped or delayed by the Android system, and even the haptic feedback (vibration) from the automation app doesn't trigger. However, if I stop moving the joystick and tap the floating button while standing still, it works perfectly. It seems like Android prioritizes the existing, continuous touch gesture on the main application window and suppresses the input hit-test for the overlay layer (TYPE_APPLICATION_OVERLAY).
[My Questions]: Is this a hardcoded limitation of Android’s touch event distribution system regarding overlay windows vs. active multi-touch? Are there any known workarounds or specific window flags/settings (even via Root/Shell) to force Android to recognize the overlay touch event instantly without dropping it during an active drag? I am currently on a rooted device, so root-level solutions or shell commands are welcome. Thank you in advance!
※This text was generated by AI.