public final class

AccessibilityManager

extends Object
java.lang.Object
   ↳ android.view.accessibility.AccessibilityManager

Class Overview

System level service that serves as an event dispatch for AccessibilityEvents, and provides facilities for querying the accessibility state of the system. Accessibility events are generated when something notable happens in the user interface, for example an Activity starts, the focus or selection of a View changes etc. Parties interested in handling accessibility events implement and register an accessibility service which extends AccessibilityService.

To obtain a handle to the accessibility manager do the following:

AccessibilityManager accessibilityManager =
        (AccessibilityManager) context.getSystemService(Context.ACCESSIBILITY_SERVICE);

Summary

Nested Classes
interface AccessibilityManager.AccessibilityStateChangeListener Listener for the system accessibility state. 
Public Methods
boolean addAccessibilityStateChangeListener(AccessibilityManager.AccessibilityStateChangeListener listener)
Registers an AccessibilityManager.AccessibilityStateChangeListener for changes in the global accessibility state of the system.
List<ServiceInfo> getAccessibilityServiceList()
This method is deprecated. Use getInstalledAccessibilityServiceList()
List<AccessibilityServiceInfo> getEnabledAccessibilityServiceList(int feedbackTypeFlags)
Returns the AccessibilityServiceInfos of the enabled accessibility services for a given feedback type.
List<AccessibilityServiceInfo> getInstalledAccessibilityServiceList()
Returns the AccessibilityServiceInfos of the installed accessibility services.
void interrupt()
Requests feedback interruption from all accessibility services.
boolean isEnabled()
Returns if the accessibility in the system is enabled.
boolean isTouchExplorationEnabled()
Returns if the touch exploration in the system is enabled.
boolean removeAccessibilityStateChangeListener(AccessibilityManager.AccessibilityStateChangeListener listener)
void sendAccessibilityEvent(AccessibilityEvent event)
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public boolean addAccessibilityStateChangeListener (AccessibilityManager.AccessibilityStateChangeListener listener)

Since: API Level 14

Registers an AccessibilityManager.AccessibilityStateChangeListener for changes in the global accessibility state of the system.

Parameters
listener The listener.
Returns
  • True if successfully registered.

public List<ServiceInfo> getAccessibilityServiceList ()

Since: API Level 4

This method is deprecated.
Use getInstalledAccessibilityServiceList()

Returns the ServiceInfos of the installed accessibility services.

Returns

public List<AccessibilityServiceInfo> getEnabledAccessibilityServiceList (int feedbackTypeFlags)

Since: API Level 14

Returns the AccessibilityServiceInfos of the enabled accessibility services for a given feedback type.

Parameters
feedbackTypeFlags The feedback type flags.
Returns

public List<AccessibilityServiceInfo> getInstalledAccessibilityServiceList ()

Since: API Level 14

Returns the AccessibilityServiceInfos of the installed accessibility services.

Returns

public void interrupt ()

Since: API Level 4

Requests feedback interruption from all accessibility services.

public boolean isEnabled ()

Since: API Level 4

Returns if the accessibility in the system is enabled.

Returns
  • True if accessibility is enabled, false otherwise.

public boolean isTouchExplorationEnabled ()

Since: API Level 14

Returns if the touch exploration in the system is enabled.

Returns
  • True if touch exploration is enabled, false otherwise.

public boolean removeAccessibilityStateChangeListener (AccessibilityManager.AccessibilityStateChangeListener listener)

Since: API Level 14
Parameters
listener The listener.
Returns
  • True if successfully unregistered.

public void sendAccessibilityEvent (AccessibilityEvent event)

Since: API Level 4
Parameters
event The event to send.
Throws
IllegalStateException if accessibility is not enabled.