0

I want to get data from another application. I used AccessibiliyService, but AccessibiliyNodeInfo does not contain the information I need. I want to get drawableLeft property from TextView. Maybe anybody know, how it to do. I have root device.

Is it possible to get an element by id? Or is there a way without using AccessibilityService?

Rahul Chokshi
  • 670
  • 4
  • 18
Alex
  • 1,407
  • 2
  • 10
  • 19

1 Answers1

1

You can't get that information utilizing accessibility service APIs. It's not available.

Accessiblity services do NOT actually connect to the App that is running, they connect to a textual representation of the app. You can find the AccessibilityNodeInfo of an element by ID, but you don't actually end up with access to the underlying View object. Just it's Assistive Technology representation.

MobA11y
  • 18,425
  • 3
  • 49
  • 76
  • But, probably, all the same there are options .... After all, if you can get the text, then, most likely you can and another parameter. Unfortunately, there is not enough knowledge to understand the source code of the getText () method from AccessibilityNodeInfo. – Alex Aug 22 '18 at 19:07
  • Yeah, lots of paramters that are sent along that are useful to ATs. Drawable Left is not one of them. Rendered coordinates on screen are available, but why it is drawn there is not. – MobA11y Aug 22 '18 at 20:17