to top
Android APIs
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 was deprecated in API level 14. 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)

Added in 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 ()

Added in API level 4

This method was deprecated in API level 14.
Use getInstalledAccessibilityServiceList()

Returns the ServiceInfos of the installed accessibility services.

Returns

public List<AccessibilityServiceInfo> getEnabledAccessibilityServiceList (int feedbackTypeFlags)

Added in 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 ()

Added in API level 14

Returns the AccessibilityServiceInfos of the installed accessibility services.

Returns

public void interrupt ()

Added in API level 4

Requests feedback interruption from all accessibility services.

public boolean isEnabled ()

Added in API level 4

Returns if the accessibility in the system is enabled.

Returns
  • True if accessibility is enabled, false otherwise.

public boolean isTouchExplorationEnabled ()

Added in 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)

Added in API level 14
Parameters
listener The listener.
Returns
  • True if successfully unregistered.

public void sendAccessibilityEvent (AccessibilityEvent event)

Added in API level 4
Parameters
event The event to send.
Throws
IllegalStateException if accessibility is not enabled. Note: The preferred mechanism for sending custom accessibility events is through calling requestSendAccessibilityEvent(View, AccessibilityEvent) instead of this method to allow predecessors to augment/filter events sent by their descendants.