Accessibility announcement on Android
Users of assistive technologies should be made aware of important changes in content through accessibility announcements. What happens next depends on the active assistive technology. The screen reader for example, will read the message aloud.
val type = AccessibilityEventCompat.TYPE_ANNOUNCEMENT val event = AccessibilityEvent.obtain(type) event.text.add("Appt announcement") event.className = Context::class.java.name event.packageName = packageName val accessibilityManager = ContextCompat.getSystemService(this, AccessibilityManager::class.java) accessibilityManager?.sendAccessibilityEvent(event)