4

I tried to create an Android Accessibility Service to detect all Elements in an App and show Accessibility Information like Content Description or Labeled by.

At the moment I can, using the AccessibilityService Class, log the Node Hierarchy when opening an App:

switch (evt.getEventType()) {
                case AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED: {
                    logNodes(getRootInActiveWindow(), 0);

But how can I get the information only of a View Element that was tapped/clicked? Is there an easy way, using Accessibility Events to do so?

If I use for example AccessibilityEvent.TYPE_VIEW_CLICKED I can detect clickable View Elements like Buttons or Checkboxes by clicking on them. But is there an Accessibility Event to get non clickable View Elements like Text-Views?

I know that Google's talback speaks whatever you tap on, using AccessibilityServices, and it doesn’t matter if it is a button or any other view Element.

react_or_angluar
  • 1,568
  • 2
  • 13
  • 20
Pirre
  • 41
  • 2

0 Answers0