I have two Accessibility services in two different apps on a device. Each of them draws some view over other apps. I faced with the following problem: when 2 Accessibility services are enabled, only one draws view, another one doesn't get any events.
Configuration for events is following:
@Override
protected void onServiceConnected() {
AccessibilityServiceInfo info = new AccessibilityServiceInfo();
info.eventTypes = AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED;
info.feedbackType = AccessibilityEvent.TYPES_ALL_MASK;
info.notificationTimeout = TIMEOUT_IN_MS;
setServiceInfo(info);
super.onServiceConnected();
}
I can reproduce it on pre-Lollipop Android version, also on Android M. Whilst on Android O and N, all services work fine.
Could somebody please explain to me how it can happen, maybe there are some improvements starting from Android N? If there is a way to make them work at the same time, could you please provide me an implementation of this?