Android Question Accessibility Services Lib - Running the sample

DonManfred

Expert
Licensed User
Longtime User
I´m using the Accessibility Services Lib
At first run i needed to go to the settingsscreen and enable the App. Right after it crashes.
Sorry, did not have a Stacktrace here.

I started the app again and not i get

*** Service (accservice) Create ***
service was created
*** Service (starter) Create ***
** Service (starter) Start **
** Service (accservice) Start **
service was started
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Service (accservice) Start **
service was started
my event: EventType: TYPE_WINDOW_CONTENT_CHANGED; EventTime: 218958819; PackageName: com.mytest; MovementGranularity: 0; Action: 0 [ ClassName: android.widget.TextView; Text: []; ContentDescription: null; ItemCount: -1; CurrentItemIndex: -1; IsEnabled: true; IsPassword: false; IsChecked: false; IsFullScreen: false; Scrollable: false; BeforeText: null; FromIndex: -1; ToIndex: -1; ScrollX: -1; ScrollY: -1; MaxScrollX: -1; MaxScrollY: -1; AddedCount: -1; RemovedCount: -1; ParcelableData: null ]; recordCount: 0
my node: [[android.view.accessibility.AccessibilityNodeInfo@7931; boundsInParent: Rect(0, 0 - 746, 93); boundsInScreen: Rect(56, 135 - 802, 228); packageName: com.mytest; className: android.widget.TextView; text: WhatsApp Acc Services; error: null; maxTextLength: -1; contentDescription: null; viewIdResName: null; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: false; longClickable: false; contextClickable: false; enabled: true; password: false; scrollable: false; importantForAccessibility: true; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null, AccessibilityAction: ACTION_NEXT_AT_MOVEMENT_GRANULARITY - null, AccessibilityAction: ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY - null, AccessibilityAction: ACTION_SET_SELECTION - null], android.view.accessibility.AccessibilityNodeInfo@a9fe; boundsInParent: Rect(0, 0 - 0, 196); boundsInScreen: Rect(1440, 84 - 1440, 280); packageName: com.mytest; className: android.widget.LinearLayout; text: null; error: null; maxTextLength: -1; contentDescription: null; viewIdResName: null; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: false; longClickable: false; contextClickable: false; enabled: true; password: false; scrollable: false; importantForAccessibility: false; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null], android.view.accessibility.AccessibilityNodeInfo@9378; boundsInParent: Rect(0, 0 - 1046, 592); boundsInScreen: Rect(197, 359 - 1243, 951); packageName: com.mytest; className: android.widget.TextView; text: Before using this app, please allow access To Accessibility Service by clicking below and in the successive setting-screen, please enable the app "WhatsAppAccService"; error: null; maxTextLength: -1; contentDescription: null; viewIdResName: null; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: false; longClickable: false; contextClickable: false; enabled: true; password: false; scrollable: false; importantForAccessibility: true; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null, AccessibilityAction: ACTION_NEXT_AT_MOVEMENT_GRANULARITY - null, AccessibilityAction: ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY - null, AccessibilityAction: ACTION_SET_SELECTION - null], android.view.accessibility.AccessibilityNodeInfo@9739; boundsInParent: Rect(0, 0 - 1046, 198); boundsInScreen: Rect(197, 990 - 1243, 1188); packageName: com.mytest; className: android.widget.Button; text: Set Accessibility Permission; error: null; maxTextLength: -1; contentDescription: null; viewIdResName: null; checkable: false; checked: false; focusable: true; focused: false; selected: false; clickable: true; longClickable: false; contextClickable: false; enabled: true; password: false; scrollable: false; importantForAccessibility: true; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_FOCUS - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_CLICK - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null, AccessibilityAction: ACTION_NEXT_AT_MOVEMENT_GRANULARITY - null, AccessibilityAction: ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY - null, AccessibilityAction: ACTION_SET_SELECTION - null], android.view.accessibility.AccessibilityNodeInfo@9afa; boundsInParent: Rect(0, 0 - 1046, 118); boundsInScreen: Rect(197, 1227 - 1243, 1345); packageName: com.mytest; className: android.widget.CheckBox; text: Status: Service enabled?; error: null; maxTextLength: -1;
Message longer than Log limit (4000). Message was truncated.
1
my event: EventType: TYPE_WINDOW_STATE_CHANGED; EventTime: 218958855; PackageName: android; MovementGranularity: 0; Action: 0 [ ClassName: android.widget.FrameLayout; Text: [Für Vollbild hier tippen.]; ContentDescription: null; ItemCount: -1; CurrentItemIndex: -1; IsEnabled: true; IsPassword: false; IsChecked: false; IsFullScreen: false; Scrollable: false; BeforeText: null; FromIndex: -1; ToIndex: -1; ScrollX: -1; ScrollY: -1; MaxScrollX: -1; MaxScrollY: -1; AddedCount: -1; RemovedCount: -1; ParcelableData: null ]; recordCount: 0
my node: [[android.view.accessibility.AccessibilityNodeInfo@7931; boundsInParent: Rect(0, 0 - 746, 93); boundsInScreen: Rect(56, 135 - 802, 228); packageName: com.mytest; className: android.widget.TextView; text: WhatsApp Acc Services; error: null; maxTextLength: -1; contentDescription: null; viewIdResName: null; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: false; longClickable: false; contextClickable: false; enabled: true; password: false; scrollable: false; importantForAccessibility: true; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null, AccessibilityAction: ACTION_NEXT_AT_MOVEMENT_GRANULARITY - null, AccessibilityAction: ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY - null, AccessibilityAction: ACTION_SET_SELECTION - null], android.view.accessibility.AccessibilityNodeInfo@a9fe; boundsInParent: Rect(0, 0 - 0, 196); boundsInScreen: Rect(1440, 84 - 1440, 280); packageName: com.mytest; className: android.widget.LinearLayout; text: null; error: null; maxTextLength: -1; contentDescription: null; viewIdResName: null; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: false; longClickable: false; contextClickable: false; enabled: true; password: false; scrollable: false; importantForAccessibility: false; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null], android.view.accessibility.AccessibilityNodeInfo@9378; boundsInParent: Rect(0, 0 - 1046, 592); boundsInScreen: Rect(197, 359 - 1243, 951); packageName: com.mytest; className: android.widget.TextView; text: Before using this app, please allow access To Accessibility Service by clicking below and in the successive setting-screen, please enable the app "WhatsAppAccService"; error: null; maxTextLength: -1; contentDescription: null; viewIdResName: null; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: false; longClickable: false; contextClickable: false; enabled: true; password: false; scrollable: false; importantForAccessibility: true; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null, AccessibilityAction: ACTION_NEXT_AT_MOVEMENT_GRANULARITY - null, AccessibilityAction: ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY - null, AccessibilityAction: ACTION_SET_SELECTION - null], android.view.accessibility.AccessibilityNodeInfo@9739; boundsInParent: Rect(0, 0 - 1046, 198); boundsInScreen: Rect(197, 990 - 1243, 1188); packageName: com.mytest; className: android.widget.Button; text: Set Accessibility Permission; error: null; maxTextLength: -1; contentDescription: null; viewIdResName: null; checkable: false; checked: false; focusable: true; focused: false; selected: false; clickable: true; longClickable: false; contextClickable: false; enabled: true; password: false; scrollable: false; importantForAccessibility: true; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_FOCUS - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_CLICK - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null, AccessibilityAction: ACTION_NEXT_AT_MOVEMENT_GRANULARITY - null, AccessibilityAction: ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY - null, AccessibilityAction: ACTION_SET_SELECTION - null], android.view.accessibility.AccessibilityNodeInfo@9afa; boundsInParent: Rect(0, 0 - 1046, 118); boundsInScreen: Rect(197, 1227 - 1243, 1345); packageName: com.mytest; className: android.widget.CheckBox; text: Status: Service enabled?; error: null; maxTextLength: -1;
Message longer than Log limit (4000). Message was truncated.
1
my event: EventType: TYPE_WINDOW_CONTENT_CHANGED; EventTime: 218958963; PackageName: com.mytest; MovementGranularity: 0; Action: 0 [ ClassName: android.widget.FrameLayout; Text: []; ContentDescription: null; ItemCount: -1; CurrentItemIndex: -1; IsEnabled: true; IsPassword: false; IsChecked: false; IsFullScreen: false; Scrollable: false; BeforeText: null; FromIndex: -1; ToIndex: -1; ScrollX: -1; ScrollY: -1; MaxScrollX: -1; MaxScrollY: -1; AddedCount: -1; RemovedCount: -1; ParcelableData: null ]; recordCount: 0
my node: [[android.view.accessibility.AccessibilityNodeInfo@7931; boundsInParent: Rect(0, 0 - 746, 93); boundsInScreen: Rect(56, 135 - 802, 228); packageName: com.mytest; className: android.widget.TextView; text: WhatsApp Acc Services; error: null; maxTextLength: -1; contentDescription: null; viewIdResName: null; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: false; longClickable: false; contextClickable: false; enabled: true; password: false; scrollable: false; importantForAccessibility: true; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null, AccessibilityAction: ACTION_NEXT_AT_MOVEMENT_GRANULARITY - null, AccessibilityAction: ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY - null, AccessibilityAction: ACTION_SET_SELECTION - null], android.view.accessibility.AccessibilityNodeInfo@a9fe; boundsInParent: Rect(0, 0 - 0, 196); boundsInScreen: Rect(1440, 84 - 1440, 280); packageName: com.mytest; className: android.widget.LinearLayout; text: null; error: null; maxTextLength: -1; contentDescription: null; viewIdResName: null; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: false; longClickable: false; contextClickable: false; enabled: true; password: false; scrollable: false; importantForAccessibility: false; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null], android.view.accessibility.AccessibilityNodeInfo@9378; boundsInParent: Rect(0, 0 - 1046, 592); boundsInScreen: Rect(197, 359 - 1243, 951); packageName: com.mytest; className: android.widget.TextView; text: Before using this app, please allow access To Accessibility Service by clicking below and in the successive setting-screen, please enable the app "WhatsAppAccService"; error: null; maxTextLength: -1; contentDescription: null; viewIdResName: null; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: false; longClickable: false; contextClickable: false; enabled: true; password: false; scrollable: false; importantForAccessibility: true; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null, AccessibilityAction: ACTION_NEXT_AT_MOVEMENT_GRANULARITY - null, AccessibilityAction: ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY - null, AccessibilityAction: ACTION_SET_SELECTION - null], android.view.accessibility.AccessibilityNodeInfo@9739; boundsInParent: Rect(0, 0 - 1046, 198); boundsInScreen: Rect(197, 990 - 1243, 1188); packageName: com.mytest; className: android.widget.Button; text: Set Accessibility Permission; error: null; maxTextLength: -1; contentDescription: null; viewIdResName: null; checkable: false; checked: false; focusable: true; focused: false; selected: false; clickable: true; longClickable: false; contextClickable: false; enabled: true; password: false; scrollable: false; importantForAccessibility: true; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_FOCUS - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_CLICK - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null, AccessibilityAction: ACTION_NEXT_AT_MOVEMENT_GRANULARITY - null, AccessibilityAction: ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY - null, AccessibilityAction: ACTION_SET_SELECTION - null], android.view.accessibility.AccessibilityNodeInfo@9afa; boundsInParent: Rect(0, 0 - 1046, 118); boundsInScreen: Rect(197, 1227 - 1243, 1345); packageName: com.mytest; className: android.widget.CheckBox; text: Status: Service enabled?; error: null; maxTextLength: -1;
Message longer than Log limit (4000). Message was truncated.
1
my event: EventType: TYPE_WINDOW_CONTENT_CHANGED; EventTime: 218958964; PackageName: com.mytest; MovementGranularity: 0; Action: 0 [ ClassName: android.widget.TextView; Text: []; ContentDescription: null; ItemCount: -1; CurrentItemIndex: -1; IsEnabled: true; IsPassword: false; IsChecked: false; IsFullScreen: false; Scrollable: false; BeforeText: null; FromIndex: -1; ToIndex: -1; ScrollX: -1; ScrollY: -1; MaxScrollX: -1; MaxScrollY: -1; AddedCount: -1; RemovedCount: -1; ParcelableData: null ]; recordCount: 0
my node: [[android.view.accessibility.AccessibilityNodeInfo@7931; boundsInParent: Rect(0, 0 - 746, 93); boundsInScreen: Rect(56, 135 - 802, 228); packageName: com.mytest; className: android.widget.TextView; text: WhatsApp Acc Services; error: null; maxTextLength: -1; contentDescription: null; viewIdResName: null; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: false; longClickable: false; contextClickable: false; enabled: true; password: false; scrollable: false; importantForAccessibility: true; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null, AccessibilityAction: ACTION_NEXT_AT_MOVEMENT_GRANULARITY - null, AccessibilityAction: ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY - null, AccessibilityAction: ACTION_SET_SELECTION - null], android.view.accessibility.AccessibilityNodeInfo@a9fe; boundsInParent: Rect(0, 0 - 0, 196); boundsInScreen: Rect(1440, 84 - 1440, 280); packageName: com.mytest; className: android.widget.LinearLayout; text: null; error: null; maxTextLength: -1; contentDescription: null; viewIdResName: null; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: false; longClickable: false; contextClickable: false; enabled: true; password: false; scrollable: false; importantForAccessibility: false; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null], android.view.accessibility.AccessibilityNodeInfo@9378; boundsInParent: Rect(0, 0 - 1046, 592); boundsInScreen: Rect(197, 359 - 1243, 951); packageName: com.mytest; className: android.widget.TextView; text: Before using this app, please allow access To Accessibility Service by clicking below and in the successive setting-screen, please enable the app "WhatsAppAccService"; error: null; maxTextLength: -1; contentDescription: null; viewIdResName: null; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: false; longClickable: false; contextClickable: false; enabled: true; password: false; scrollable: false; importantForAccessibility: true; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null, AccessibilityAction: ACTION_NEXT_AT_MOVEMENT_GRANULARITY - null, AccessibilityAction: ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY - null, AccessibilityAction: ACTION_SET_SELECTION - null], android.view.accessibility.AccessibilityNodeInfo@9739; boundsInParent: Rect(0, 0 - 1046, 198); boundsInScreen: Rect(197, 990 - 1243, 1188); packageName: com.mytest; className: android.widget.Button; text: Set Accessibility Permission; error: null; maxTextLength: -1; contentDescription: null; viewIdResName: null; checkable: false; checked: false; focusable: true; focused: false; selected: false; clickable: true; longClickable: false; contextClickable: false; enabled: true; password: false; scrollable: false; importantForAccessibility: true; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_FOCUS - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_CLICK - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null, AccessibilityAction: ACTION_NEXT_AT_MOVEMENT_GRANULARITY - null, AccessibilityAction: ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY - null, AccessibilityAction: ACTION_SET_SELECTION - null], android.view.accessibility.AccessibilityNodeInfo@9afa; boundsInParent: Rect(0, 0 - 1046, 118); boundsInScreen: Rect(197, 1227 - 1243, 1345); packageName: com.mytest; className: android.widget.CheckBox; text: Status: Service enabled?; error: null; maxTextLength: -1;
Message longer than Log limit (4000). Message was truncated.
1
my event: EventType: TYPE_WINDOW_CONTENT_CHANGED; EventTime: 218959071; PackageName: com.mytest; MovementGranularity: 0; Action: 0 [ ClassName: android.view.ViewGroup; Text: []; ContentDescription: null; ItemCount: -1; CurrentItemIndex: -1; IsEnabled: true; IsPassword: false; IsChecked: false; IsFullScreen: false; Scrollable: false; BeforeText: null; FromIndex: -1; ToIndex: -1; ScrollX: -1; ScrollY: -1; MaxScrollX: -1; MaxScrollY: -1; AddedCount: -1; RemovedCount: -1; ParcelableData: null ]; recordCount: 0
my node: [[android.view.accessibility.AccessibilityNodeInfo@7931; boundsInParent: Rect(0, 0 - 746, 93); boundsInScreen: Rect(56, 135 - 802, 228); packageName: com.mytest; className: android.widget.TextView; text: WhatsApp Acc Services; error: null; maxTextLength: -1; contentDescription: null; viewIdResName: null; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: false; longClickable: false; contextClickable: false; enabled: true; password: false; scrollable: false; importantForAccessibility: true; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null, AccessibilityAction: ACTION_NEXT_AT_MOVEMENT_GRANULARITY - null, AccessibilityAction: ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY - null, AccessibilityAction: ACTION_SET_SELECTION - null], android.view.accessibility.AccessibilityNodeInfo@a9fe; boundsInParent: Rect(0, 0 - 0, 196); boundsInScreen: Rect(1440, 84 - 1440, 280); packageName: com.mytest; className: android.widget.LinearLayout; text: null; error: null; maxTextLength: -1; contentDescription: null; viewIdResName: null; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: false; longClickable: false; contextClickable: false; enabled: true; password: false; scrollable: false; importantForAccessibility: false; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null], android.view.accessibility.AccessibilityNodeInfo@9378; boundsInParent: Rect(0, 0 - 1046, 592); boundsInScreen: Rect(197, 359 - 1243, 951); packageName: com.mytest; className: android.widget.TextView; text: Before using this app, please allow access To Accessibility Service by clicking below and in the successive setting-screen, please enable the app "WhatsAppAccService"; error: null; maxTextLength: -1; contentDescription: null; viewIdResName: null; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: false; longClickable: false; contextClickable: false; enabled: true; password: false; scrollable: false; importantForAccessibility: true; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null, AccessibilityAction: ACTION_NEXT_AT_MOVEMENT_GRANULARITY - null, AccessibilityAction: ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY - null, AccessibilityAction: ACTION_SET_SELECTION - null], android.view.accessibility.AccessibilityNodeInfo@9739; boundsInParent: Rect(0, 0 - 1046, 198); boundsInScreen: Rect(197, 990 - 1243, 1188); packageName: com.mytest; className: android.widget.Button; text: Set Accessibility Permission; error: null; maxTextLength: -1; contentDescription: null; viewIdResName: null; checkable: false; checked: false; focusable: true; focused: false; selected: false; clickable: true; longClickable: false; contextClickable: false; enabled: true; password: false; scrollable: false; importantForAccessibility: true; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_FOCUS - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_CLICK - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null, AccessibilityAction: ACTION_NEXT_AT_MOVEMENT_GRANULARITY - null, AccessibilityAction: ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY - null, AccessibilityAction: ACTION_SET_SELECTION - null], android.view.accessibility.AccessibilityNodeInfo@9afa; boundsInParent: Rect(0, 0 - 1046, 118); boundsInScreen: Rect(197, 1227 - 1243, 1345); packageName: com.mytest; className: android.widget.CheckBox; text: Status: Service enabled?; error: null; maxTextLength: -1;
Message longer than Log limit (4000). Message was truncated.
1
my event: EventType: TYPE_WINDOWS_CHANGED; EventTime: 218959142; PackageName: null; MovementGranularity: 0; Action: 0 [ ClassName: null; Text: []; ContentDescription: null; ItemCount: -1; CurrentItemIndex: -1; IsEnabled: false; IsPassword: false; IsChecked: false; IsFullScreen: false; Scrollable: false; BeforeText: null; FromIndex: -1; ToIndex: -1; ScrollX: -1; ScrollY: -1; MaxScrollX: -1; MaxScrollY: -1; AddedCount: -1; RemovedCount: -1; ParcelableData: null ]; recordCount: 0
my node: [[android.view.accessibility.AccessibilityNodeInfo@7931; boundsInParent: Rect(0, 0 - 746, 93); boundsInScreen: Rect(56, 135 - 802, 228); packageName: com.mytest; className: android.widget.TextView; text: WhatsApp Acc Services; error: null; maxTextLength: -1; contentDescription: null; viewIdResName: null; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: false; longClickable: false; contextClickable: false; enabled: true; password: false; scrollable: false; importantForAccessibility: true; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null, AccessibilityAction: ACTION_NEXT_AT_MOVEMENT_GRANULARITY - null, AccessibilityAction: ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY - null, AccessibilityAction: ACTION_SET_SELECTION - null], android.view.accessibility.AccessibilityNodeInfo@a9fe; boundsInParent: Rect(0, 0 - 0, 196); boundsInScreen: Rect(1440, 84 - 1440, 280); packageName: com.mytest; className: android.widget.LinearLayout; text: null; error: null; maxTextLength: -1; contentDescription: null; viewIdResName: null; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: false; longClickable: false; contextClickable: false; enabled: true; password: false; scrollable: false; importantForAccessibility: false; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null], android.view.accessibility.AccessibilityNodeInfo@9378; boundsInParent: Rect(0, 0 - 1046, 592); boundsInScreen: Rect(197, 359 - 1243, 951); packageName: com.mytest; className: android.widget.TextView; text: Before using this app, please allow access To Accessibility Service by clicking below and in the successive setting-screen, please enable the app "WhatsAppAccService"; error: null; maxTextLength: -1; contentDescription: null; viewIdResName: null; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: false; longClickable: false; contextClickable: false; enabled: true; password: false; scrollable: false; importantForAccessibility: true; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null, AccessibilityAction: ACTION_NEXT_AT_MOVEMENT_GRANULARITY - null, AccessibilityAction: ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY - null, AccessibilityAction: ACTION_SET_SELECTION - null], android.view.accessibility.AccessibilityNodeInfo@9739; boundsInParent: Rect(0, 0 - 1046, 198); boundsInScreen: Rect(197, 990 - 1243, 1188); packageName: com.mytest; className: android.widget.Button; text: Set Accessibility Permission; error: null; maxTextLength: -1; contentDescription: null; viewIdResName: null; checkable: false; checked: false; focusable: true; focused: false; selected: false; clickable: true; longClickable: false; contextClickable: false; enabled: true; password: false; scrollable: false; importantForAccessibility: true; actions: [AccessibilityAction: ACTION_SELECT - null, AccessibilityAction: ACTION_CLEAR_SELECTION - null, AccessibilityAction: ACTION_FOCUS - null, AccessibilityAction: ACTION_ACCESSIBILITY_FOCUS - null, AccessibilityAction: ACTION_CLICK - null, AccessibilityAction: ACTION_SHOW_ON_SCREEN - null, AccessibilityAction: ACTION_NEXT_AT_MOVEMENT_GRANULARITY - null, AccessibilityAction: ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY - null, AccessibilityAction: ACTION_SET_SELECTION - null], android.view.accessibility.AccessibilityNodeInfo@9afa; boundsInParent: Rect(0, 0 - 1046, 118); boundsInScreen: Rect(197, 1227 - 1243, 1345); packageName: com.mytest; className: android.widget.CheckBox; text: Status: Service enabled?; error: null; maxTextLength: -1;
Message longer than Log limit (4000). Message was truncated.
1
java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.String java.lang.CharSequence.toString()' on a null object reference
at com.tillekesoft.accessibilityservices.AccessibilityEventsListenerWrapper.onAccessibilityEvent(AccessibilityEventsListenerWrapper.java:161)
at android.accessibilityservice.AccessibilityService$2.onAccessibilityEvent(AccessibilityService.java:1550)
at android.accessibilityservice.AccessibilityService$IAccessibilityServiceClientWrapper.executeMessage(AccessibilityService.java:1735)
at com.android.internal.os.HandlerCaller$MyHandler.handleMessage(HandlerCaller.java:37)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6940)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)

I did not checked the sample code or the java source as yet.
It crashes in this line as the event.getPackageName() and event.getClassName() are null

B4X:
            ComponentName componentName = new ComponentName(event.getPackageName().toString(), event.getClassName().toString());
 

moster67

Expert
Licensed User
Longtime User
Unsure why this is happening to you...I have tested it on numerous devices and never seen the first crash-problem after approving the app.service, nor the error shown in your Stacktrace. Try to uninstall the app and then run it again.
Which device do you have?
 
Last edited:
Upvote 0

Inman

Well-Known Member
Licensed User
Longtime User
I am getting the same error. I tried uninstalling and reinstalling. What happens is when you reinstall the app, our Whatsapp Accessibility service is again disabled by default. In that state if you type a message and hit the send button, it opens Whatsapp, finds the corresponding chat for the contact, types in the message but does not hit the Send button by itself as the Accessibility service is not enabled.

As soon as you enable this service, it crashes again. Tried reinstalling multiple times.

My Devices
  • Samsung Galaxy S8+ (Android 8.0)
  • Huawei P20 Pro (Android 8.1)
 
Upvote 0

Inman

Well-Known Member
Licensed User
Longtime User
You are right. There was an accessibility service for an app called Universal Copy that I use to copy text from apps that do not allow copying. When I disable that app's accessibility service, your example works great.

So does that mean only one accessibility service can be used at any time? Doesn't seem to affect Universal Copy as it continues to work even when the service in this example is turned on.
 
Upvote 0

moster67

Expert
Licensed User
Longtime User
Not sure about that. I think I read this might be the case but the documentation is not very clear. Maybe someone could google it or ask on Stackoverflow ..
 
Upvote 0

moster67

Expert
Licensed User
Longtime User
Doesn't seem to affect Universal Copy as it continues to work even when the service in this example is turned on.

Maybe a configuration issue? I will have a look in a few weeks when I get back
 
Upvote 0
Top