问题
Issue: Not getting every text on screen in android pie, checked till nougat the code was working fine.
Device: Xiomi MiA1(Android One), Version- 9.0
Xml Settings:
<?xml version="1.0" encoding="utf-8"?>
<accessibility-service xmlns:android="http://schemas.android.com/apk/res/android"
android:accessibilityEventTypes="typeAllMask"
android:accessibilityFlags="flagIncludeNotImportantViews|flagReportViewIds"
android:canRetrieveWindowContent="true"
android:canRequestTouchExplorationMode="true"
android:packageNames="com.example"
android:accessibilityFeedbackType="feedbackSpoken"
/>
What I have tried: I have tried by removing flagIncludeNotImportantViews flag from xml settings but its not working tried by turning on/off many options inside Accessibility Settings of the device but nothing worked out.
What I am getting: Only texts which can be changed inside an app but not which are hard coded like "Settings", "About App", etc.
So please help me with this issue or if can provide any alternatives to read hard coded texts.
来源:https://stackoverflow.com/questions/54880922/accessibility-service-is-unable-to-read-all-of-the-screen-content