我正在尝试使用我的应用程序的辅助功能服务来使用辅助功能单击“允许设置”。我查看了 AccessibilityNode,但在 TextView 中看不到任何可交互的内容。这是节点的输出:
Event Type: TYPE_WINDOW_CONTENT_CHANGED com.google.android.permissioncontroller android.widget.FrameLayout
Source:
0 | class name: android.widget.FrameLayout text: null content description: null input type 0 actions: ACTION_SELECT, ACTION_CLEAR_SELECTION, ACTION_ACCESSIBILITY_FOCUS, ACTION_SHOW_ON_SCREEN
1 | class name: android.widget.ScrollView text: null content description: null input type 0 actions: ACTION_FOCUS, ACTION_SELECT, ACTION_CLEAR_SELECTION, ACTION_ACCESSIBILITY_FOCUS, ACTION_SHOW_ON_SCREEN
2 | class name: android.widget.TextView text: Change location access for AppName? content description: null input type 0 actions: ACTION_SELECT, ACTION_CLEAR_SELECTION, ACTION_ACCESSIBILITY_FOCUS, ACTION_NEXT_AT_MOVEMENT_GRANULARITY, ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY, ACTION_SET_SELECTION, ACTION_SHOW_ON_SCREEN
2 | class name: android.widget.TextView text: This app wants to access your location all the time, even when you’re not using the app. Allow in settings. content description: null input type 0 actions: ACTION_FOCUS, ACTION_SELECT, ACTION_CLEAR_SELECTION, ACTION_ACCESSIBILITY_FOCUS, ACTION_NEXT_AT_MOVEMENT_GRANULARITY, ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY, ACTION_SET_SELECTION, ACTION_SHOW_ON_SCREEN
2 | class name: android.widget.Button text: Keep “While the app is in use” content description: null input type 0 actions: ACTION_FOCUS, ACTION_SELECT, ACTION_CLEAR_SELECTION, ACTION_CLICK, ACTION_ACCESSIBILITY_FOCUS, ACTION_NEXT_AT_MOVEMENT_GRANULARITY, ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY, ACTION_SET_SELECTION, ACTION_SHOW_ON_SCREEN
TextView 只有少数几个可用的操作。据我所知,我已经尝试了可用的操作,但没有成功。
我还探索了“允许设置”部分的直接意图的想法,但目前没有。我们的应用程序要求位置始终处于开启状态。