I've written an app using an accessibilityService.
I've found that I can detect when notifications appear in the notification bar, but cannot work out how to trigger when they get cleared.
According to the android api docs:
TYPE_NOTIFICATION_STATE_CHANGED "Represents the event showing/hiding a Notification. "
..so I'm confused to why the onAccessibilityEvent only ever seems to get fired when showing an event, but not hiding one.
I'm registering the service with the following:
AccessibilityServiceInfo localAccessibilityServiceInfo = new AccessibilityServiceInfo();
localAccessibilityServiceInfo.eventTypes = AccessibilityEvent.TYPES_ALL_MASK; //monitor all, then we can
localAccessibilityServiceInfo.notificationTimeout = 80L;
localAccessibilityServiceInfo.feedbackType = AccessibilityServiceInfo.DEFAULT;
setServiceInfo(localAccessibilityServiceInfo);
Does anyone know why this would not pick up on the hiding of a notification?
Running into the same problem over here.
I assume you're the same Andrew that filed the bug report here: http://code.google.com/p/android/issues/detail?id=18763 - I'm eager to know if anyone has discovered any workarounds.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With