您可以尝试在辅助服务设置AccessibilityServiceInfo.FLAG_INCLUDE_NOT_IMPORTANT_VIEWS
和监听事件像
case AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED: {
AccessibilityNodeInfo nodes = getRootInActiveWindow();
String nodeText = nodes.getText();
String nodeContentText nodes.getContentDescription();
// Also you could cycle through the children repeating the same
// As an example only taking the first child, you could
// loop through or use recursion
AccessibilityNodeInfo firstNode = nodes.getChild(0)
String nodeTextFirstChild = firstNode.getText();
String nodeContentTextFirstChild = firstNode.getContentDescription();
}
我使用的,但不能读取其他应用系统dailog。 –