To develop an accessibility application, you must create an accessibility service that inherits the
AccessibleAbility class. This class provides the following basic
accessibility service capabilities:
AccessibleAbility.onAbilityConnected()AccessibleAbility.onInterrupt()AccessibleAbility.onAccessibilityEvent(ohos.accessibility.AccessibilityEventInfo)AccessibleAbility.onKeyPressEvent(ohos.multimodalinput.event.KeyEvent)
AccessibleAbility.getRootAccessibilityInfo()AccessibleAbility.getWindows()AccessibleAbility.gainFocus(int)AccessibleAbility.performCommonAction(int),AccessibleAbility.disableAbility()Using the methods provided in this package, you can perform the following operations:
AccessibleAbility.getSoftKeyBoardController() method to obtain
the SoftKeyBoardController object for controlling the show/hide mode of the
soft keyboard.SoftKeyBoardListener method to listen for changes of the soft
keyboard's show/hide mode and implement some customized operations.AccessibleAbility.getDisplayResizeController() method to obtain
the DisplayResizeController object for controlling the display resizing and
obtaining the resizing scale of the display resizing rectangle.DisplayResizeListener method to listen for the display
resizing operations and implement some customized operations.AccessibleAbility.onGesture(int) method to listen for the
current gesture and implement some customized logics.AccessibleAbility.gestureSimulate(java.util.List, ohos.accessibility.ability.GestureResultListener)
method to define a user gesture by simply passing the start position of this gesture path and the duration in
which this gesture path continues.GestureResultListener method to listen for whether the gesture is
successfully defined and implement some customized operations.| 接口 | 说明 |
|---|---|
| DisplayResizeListener |
Provides a callback to listen for display resizing operations.
|
| SoftKeyBoardListener |
Provides a callback for you to listen for changes of the soft keyboard's show/hide mode.
|
| 类 | 说明 |
|---|---|
| AccessibilityInfo |
Provides methods for obtaining information about an accessibility node.
|
| AccessibilityWindow |
Provides information about one or multiple accessibility windows for you to obtain the content displayed on your
device screen.
|
| AccessibleAbility |
Provides capabilities for you to develop your own accessibility application.
|
| AccessibleOperation |
Defines an accessibility operation.
|
| DisplayResizeController |
Provides a controller for the display resizing operations.
|
| GesturePathDefine |
Defines the path of a gesture.
|
| GesturePathPositionDefine |
Describes the position for the path of a gesture.
|
| GestureResultListener |
Provides a listener to observe the result of sending gestures to the screen.
|
| GestureResultListenerInfo |
Provides information about the listener observing the gestures sent to the screen.
|
| SoftKeyBoardController |
Provides a soft keyboard controller.
|