X-SLAYER / flutter_accessibility_service

Flutter plugin for interacting with Accessibility Service in Android.
https://pub.dev/packages/flutter_accessibility_service
MIT License
33 stars 24 forks source link

fix get text node recursion; align captured text src with android os #11

Closed xuxiaowei13 closed 1 year ago

xuxiaowei13 commented 1 year ago
  1. fix get text recursion A->B->A capturing some app2
  2. prefer content description to text aligning with android os implementation
  3. add missing exported flag
X-SLAYER commented 1 year ago

looks good to me but i already removed the text nodes in the next version to become subNodes check the code on automation branch if you can try it and contribute if you want

xuxiaowei13 commented 1 year ago

@X-SLAYER then how do you capture screen texts in the next version? or you maintain a virtual node tree?

X-SLAYER commented 1 year ago

run the example in the branch you will understand it , I still working on it tbh but that's the main it will be like that the subNodes will become of the type AcceesiiblityNode so they have text and id and all

xuxiaowei13 commented 1 year ago

cool! I'll check it up. BTW, have you ever tried traversing all the nodes of the screen starting from the root(getRootInActiveWindow)? for some specific apps, nodes cannot be traversed... I was wondering that you might know why...

X-SLAYER commented 1 year ago

i'm already trying on this too cuz I needed the root so I will check what I will do about it

xuxiaowei13 commented 1 year ago

i'm already trying on this too cuz I needed the root so I will check what I will do about it

When I use the root to traverse the entire screen, for apps like Weibo some informative nodes are not on the root tree... But if some of them could be collected by events, and others cannot be collected in any way... so that's very tricky... Do you see a lot of apps like that?