My question is I want to retrive every visible and clickable view on the screen with their position,including itemviews of recyclerView using accessibility service and their positions on screen.
I have configured accessibilityService as below.
<?xml version="1.0" encoding="utf-8"?>
<accessibility-service
xmlns:android="http://schemas.android.com/apk/res/android"
android:accessibilityEventTypes="typeWindowContentChanged|
typeWindowStatChanged"
android:accessibilityFeedbackType="feedbackAllMask"
android:accessibilityFlags="flagDefault"
android:canPerformGestures="true"
android:canRetrieveWindowContent="true"
android:notificationTimeout="100"
/>
but I am not getting every visible view on screen.Is there any other way to get all view visible on screen??
Do note my comment on missing the code that you're utilizing to actually look at the node hierarchy. That being said, if you truly want to see ALL views, you're xml configuration is missing a flag.
I recommend replacing this line:
android:accessibilityFlags="flagDefault"
With the following:
android:accessibilityFlags="flagDefault|flagIncludeNotImportantViews"