I am working on a small project for my own use and I need my accessibility service to perform a tap on the screen and show/hide the controls from video players such as Netflix or youtube.
So in my accessibilityService I use getRootInActiveWindow() and I get reference to the app window (com.netflix.mediaclient for example)
I then traverse through all the nodes and I do performAction(AccessibilityNodeInfo.ACTION_CLICK) but it seems none of the nodes are clickable (when the media player control is hidden, otherwise I can click on control buttons) and I can`t make the media player control to show up.
Any idea why this might be the case? Also, is it possible to perform a tap on the screen in general and not on a specific AccessibilityNodeInfo?
UPDATE
It turned out the issue was that ACTION_CLICK does not work as a TOUCH so if the view reacts to touch events but not to click events then ACTION_CLICK will not do anything. Unfortunately, it seems like there is no way to perform tap on AccessibilityNodeInfo objects.