Is there a way to intercept all touch/tap events f...
# compose
m
Is there a way to intercept all touch/tap events from all windows I have in my app not just the app/activity main window? I run a specific logic in the Main Activity whenever the user taps on any part of my app's UI. To intercept touch events/user interactions I was overriding
onUserInteraction
method in the main activity and run that logic from there. This works for any composable as long as they are in the same activity window but somewhere deep in the hierarchy I have some dialogs that will be shown conditionally. Obviously this interception technique doesn't work with these Dialogs because they live in their own window. Is there a way to achieve what I want globally?