Android AccessibilityEvent api文档

安卓使用无障碍服务监听微信和QQ的收款信息 导读: 资深的安卓程序员想必都了解,安卓的通知监听服务(NotificationListenerService)可以监听通知栏的信息,从通知栏信息里获取到我们想要的收款信息(比如收款类型、收款金额)。但是,这个通知监听服务有个弊端,如果APP没有发送通知,那就没办法知道有没有收到款,特别是现在的微信 和QQ,二维码收款不再发送通知,而是在自身的APP里给出提示,这样就没办法使用通知监听服务了。因此,我们需要使用安卓的无障碍服务(AccessibilityService),来监听APP界面的变化,实时获取支 阅读详情

老是要穿墙去看着官方文档真是麻烦死了,存在这里吧。顺便说一句,这blog做得太烂了,垃圾功能太多,老出问题、慢得要命、烦得要死,真是受不了


https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent
 |Java

public final class AccessibilityEvent
extends AccessibilityRecord implements Parcelable

java.lang.Object
   ↳android.view.accessibility.AccessibilityRecord
   ↳android.view.accessibility.AccessibilityEvent


This class represents accessibility events that are sent by the system when something notable happens in the user interface. For example, when a Button is clicked, a View is focused, etc.

An accessibility event is fired by an individual view which populates the event with data for its state and requests from its parent to send the event to interested parties. The parent can optionally modify or even block the event based on its broader understanding of the user interface's context.

The main purpose of an accessibility event is to communicate changes in the UI to an AccessibilityService. The service may then inspect, if needed the user interface by examining the View hierarchy, as represented by a tree of AccessibilityNodeInfos (snapshot of a View state) which can be used for exploring the window content. Note that the privilege for accessing an event's source, thus the window content, has to be explicitly requested. For more details refer to AccessibilityService. If an accessibility service has not requested to retrieve the window content the event will not contain reference to its source. Also for events of type TYPE_NOTIFICATION_STATE_CHANGED the source is never available.

This class represents various semantically different accessibility event types. Each event type has an associated set of related properties. In other words, each event type is characterized via a subset of the properties exposed by this class. For each event type there is a corresponding constant defined in this class. Follows a specification of the event types and their associated properties:

Developer Guides

For more information about creating and processing AccessibilityEvents, read the Accessibility developer guide.

VIEW TYPES

View clicked - represents the event of clicking on a View like Button, CompoundButton, etc.
Type:TYPE_VIEW_CLICKED
Properties:

View long clicked - represents the event of long clicking on a View like Button, CompoundButton, etc
Type:TYPE_VIEW_LONG_CLICKED
Properties:

View selected - represents the event of selecting an item usually in the context of an AdapterView.
Type: TYPE_VIEW_SELECTED
Properties:

View focused - represents the event of focusing a View.
Type: TYPE_VIEW_FOCUSED
Properties:

View text changed - represents the event of changing the text of an EditText.
Type: TYPE_VIEW_TEXT_CHANGED
Properties:

View text selection changed - represents the event of changing the text selection of an EditText.
Type: TYPE_VIEW_TEXT_SELECTION_CHANGED
Properties:

View text traversed at movement granularity - represents the event of traversing the text of a view at a given granularity. For example, moving to the next word.
Type: TYPE_VIEW_TEXT_TRAVERSED_AT_MOVEMENT_GRANULARITY
Properties:

View scrolled - represents the event of scrolling a view.
Type: TYPE_VIEW_SCROLLED
Properties:

TRANSITION TYPES

Window state changed - represents the event of a change to a section of the user interface that is visually distinct. Should be sent from either the root view of a window or from a view that is marked as a pane View.setAccessibilityPaneTitle(CharSequence). Note that changes to true windows are represented by TYPE_WINDOWS_CHANGED.
Type: TYPE_WINDOW_STATE_CHANGED
Properties:

Window content changed - represents the event of change in the content of a window. This change can be adding/removing view, changing a view size, etc.

Type: TYPE_WINDOW_CONTENT_CHANGED
Properties:

Windows changed - represents a change in the windows shown on the screen such as a window appeared, a window disappeared, a window size changed, a window layer changed, etc. These events should only come from the system, which is responsible for managing windows. The list of windows is available from AccessibilityService.getWindows(). For regions of the user interface that are presented as windows but are controlled by an app's process, use TYPE_WINDOW_STATE_CHANGED.
Type: TYPE_WINDOWS_CHANGED
Properties:

Note: You can retrieve the AccessibilityWindowInfo for the window source of the event by looking through the list returned by AccessibilityService.getWindows() for the window whose ID matches AccessibilityRecord.getWindowId().

NOTIFICATION TYPES

Notification state changed - represents the event showing a transient piece of information to the user. This information may be a Notification or Toast.
Type: TYPE_NOTIFICATION_STATE_CHANGED
Properties:

EXPLORATION TYPES

View hover enter - represents the event of beginning to hover over a View. The hover may be generated via exploring the screen by touch or via a pointing device.
Type: TYPE_VIEW_HOVER_ENTER
Properties:

View hover exit - represents the event of stopping to hover over a View. The hover may be generated via exploring the screen by touch or via a pointing device.
Type: TYPE_VIEW_HOVER_EXIT
Properties:

Touch interaction start - represents the event of starting a touch interaction, which is the user starts touching the screen.
Type: TYPE_TOUCH_INTERACTION_START
Properties:

Note: This event is fired only by the system and is not passed to the view tree to be populated.

Touch interaction end - represents the event of ending a touch interaction, which is the user stops touching the screen.
Type: TYPE_TOUCH_INTERACTION_END
Properties:

Note: This event is fired only by the system and is not passed to the view tree to be populated.

Touch exploration gesture start - represents the event of starting a touch exploring gesture.
Type: TYPE_TOUCH_EXPLORATION_GESTURE_START
Properties:

Note: This event is fired only by the system and is not passed to the view tree to be populated.

Touch exploration gesture end - represents the event of ending a touch exploring gesture.
Type: TYPE_TOUCH_EXPLORATION_GESTURE_END
Properties:

Note: This event is fired only by the system and is not passed to the view tree to be populated.

Touch gesture detection start - represents the event of starting a user gesture detection.
Type: TYPE_GESTURE_DETECTION_START
Properties:

Note: This event is fired only by the system and is not passed to the view tree to be populated.

Touch gesture detection end - represents the event of ending a user gesture detection.
Type: TYPE_GESTURE_DETECTION_END
Properties:

Note: This event is fired only by the system and is not passed to the view tree to be populated.

MISCELLANEOUS TYPES

Announcement - represents the event of an application requesting a screen reader to make an announcement. Because the event carries no semantic meaning, this event is appropriate only in exceptional situations where additional screen reader output is needed but other types of accessibility services do not need to be aware of the change.
Type: TYPE_ANNOUNCEMENT
Properties:

See also:

Summary

Constants

intCONTENT_CHANGE_TYPE_CONTENT_DESCRIPTION

Change type for TYPE_WINDOW_CONTENT_CHANGED event: The node's content description changed.

intCONTENT_CHANGE_TYPE_DRAG_CANCELLED

Change type for TYPE_WINDOW_CONTENT_CHANGED event: A drag in with accessibility enabled has ended.

intCONTENT_CHANGE_TYPE_DRAG_DROPPED

Change type for TYPE_WINDOW_CONTENT_CHANGED event: A drag in with accessibility enabled has ended.

intCONTENT_CHANGE_TYPE_DRAG_STARTED

Change type for TYPE_WINDOW_CONTENT_CHANGED event: A drag has started while accessibility is enabled.

intCONTENT_CHANGE_TYPE_PANE_APPEARED

Change type for TYPE_WINDOW_STATE_CHANGED event: The node has a pane title, and either just appeared or just was assigned a title when it had none before.

intCONTENT_CHANGE_TYPE_PANE_DISAPPEARED

Change type for TYPE_WINDOW_STATE_CHANGED event: Can mean one of two slightly different things.

intCONTENT_CHANGE_TYPE_PANE_TITLE

Change type for TYPE_WINDOW_STATE_CHANGED event: The node's pane title changed.

intCONTENT_CHANGE_TYPE_STATE_DESCRIPTION

Change type for TYPE_WINDOW_CONTENT_CHANGED event: state description of the node as returned by AccessibilityNodeInfo#getStateDescription changed.

intCONTENT_CHANGE_TYPE_SUBTREE

Change type for TYPE_WINDOW_CONTENT_CHANGED event: One or more content changes occurred in the the subtree rooted at the source node, or the subtree's structure changed when a node was added or removed.

intCONTENT_CHANGE_TYPE_TEXT

Change type for TYPE_WINDOW_CONTENT_CHANGED event: The node's text changed.

intCONTENT_CHANGE_TYPE_UNDEFINED

Change type for TYPE_WINDOW_CONTENT_CHANGED event: The type of change is not defined.

intINVALID_POSITION

Invalid selection/focus position.

intMAX_TEXT_LENGTH

Maximum length of the text fields.

intSPEECH_STATE_LISTENING_END

Change type for TYPE_SPEECH_STATE_CHANGE event: another service is no longer listening to the microphone.

intSPEECH_STATE_LISTENING_START

Change type for TYPE_SPEECH_STATE_CHANGE event: another service is listening to the microphone.

intSPEECH_STATE_SPEAKING_END

Change type for TYPE_SPEECH_STATE_CHANGE event: another service is no longer speaking.

intSPEECH_STATE_SPEAKING_START

Change type for TYPE_SPEECH_STATE_CHANGE event: another service is speaking.

intTYPES_ALL_MASK

Mask for AccessibilityEvent all types.

intTYPE_ANNOUNCEMENT

Represents the event of an application making an announcement.

intTYPE_ASSIST_READING_CONTEXT

Represents the event of the assistant currently reading the users screen context.

intTYPE_GESTURE_DETECTION_END

Represents the event of ending gesture detection.

intTYPE_GESTURE_DETECTION_START

Represents the event of beginning gesture detection.

intTYPE_NOTIFICATION_STATE_CHANGED

Represents the event showing a Notification.

intTYPE_SPEECH_STATE_CHANGE

Represents a change in the speech state defined by the content-change types.

intTYPE_TOUCH_EXPLORATION_GESTURE_END

Represents the event of ending a touch exploration gesture.

intTYPE_TOUCH_EXPLORATION_GESTURE_START

Represents the event of starting a touch exploration gesture.

intTYPE_TOUCH_INTERACTION_END

Represents the event of the user ending to touch the screen.

intTYPE_TOUCH_INTERACTION_START

Represents the event of the user starting to touch the screen.

intTYPE_VIEW_ACCESSIBILITY_FOCUSED

Represents the event of gaining accessibility focus.

intTYPE_VIEW_ACCESSIBILITY_FOCUS_CLEARED

Represents the event of clearing accessibility focus.

intTYPE_VIEW_CLICKED

Represents the event of clicking on a View like Button, CompoundButton, etc.

intTYPE_VIEW_CONTEXT_CLICKED

Represents the event of a context click on a View.

intTYPE_VIEW_FOCUSED

Represents the event of setting input focus of a View.

intTYPE_VIEW_HOVER_ENTER

Represents the event of a hover enter over a View.

intTYPE_VIEW_HOVER_EXIT

Represents the event of a hover exit over a View.

intTYPE_VIEW_LONG_CLICKED

Represents the event of long clicking on a View like Button, CompoundButton, etc.

intTYPE_VIEW_SCROLLED

Represents the event of scrolling a view.

intTYPE_VIEW_SELECTED

Represents the event of selecting an item usually in the context of an AdapterView.

intTYPE_VIEW_TEXT_CHANGED

Represents the event of changing the text of an EditText.

intTYPE_VIEW_TEXT_SELECTION_CHANGED

Represents the event of changing the selection in an EditText.

intTYPE_VIEW_TEXT_TRAVERSED_AT_MOVEMENT_GRANULARITY

Represents the event of traversing the text of a view at a given movement granularity.

intTYPE_WINDOWS_CHANGED

Represents the event change in the system windows shown on the screen.

intTYPE_WINDOW_CONTENT_CHANGED

Represents the event of changing the content of a window and more specifically the sub-tree rooted at the event's source.

intTYPE_WINDOW_STATE_CHANGED

Represents the event of a change to a visually distinct section of the user interface.

intWINDOWS_CHANGE_ACCESSIBILITY_FOCUSED

Change type for TYPE_WINDOWS_CHANGED event: The window's AccessibilityWindowInfo#isAccessibilityFocused() changed.

intWINDOWS_CHANGE_ACTIVE

Change type for TYPE_WINDOWS_CHANGED event: The window's AccessibilityWindowInfo#isActive() changed.

intWINDOWS_CHANGE_ADDED

Change type for TYPE_WINDOWS_CHANGED event: The window was added.

intWINDOWS_CHANGE_BOUNDS

Change type for TYPE_WINDOWS_CHANGED event: The window's bounds changed.

intWINDOWS_CHANGE_CHILDREN

Change type for TYPE_WINDOWS_CHANGED event: The window's children changed.

intWINDOWS_CHANGE_FOCUSED

Change type for TYPE_WINDOWS_CHANGED event: The window's AccessibilityWindowInfo#isFocused() changed.

intWINDOWS_CHANGE_LAYER

Change type for TYPE_WINDOWS_CHANGED event: The window's layer changed.

intWINDOWS_CHANGE_PARENT

Change type for TYPE_WINDOWS_CHANGED event: The window's parent changed.

intWINDOWS_CHANGE_PIP

Change type for TYPE_WINDOWS_CHANGED event: The window either entered or exited picture-in-picture mode.

intWINDOWS_CHANGE_REMOVED

Change type for TYPE_WINDOWS_CHANGED event: A window was removed.

intWINDOWS_CHANGE_TITLE

Change type for TYPE_WINDOWS_CHANGED event: The window's title changed.

Inherited constants

From interface android.os.Parcelable

Fields

public static final Creator<AccessibilityEvent>CREATOR

Public constructors

AccessibilityEvent()

Creates a new AccessibilityEvent.

AccessibilityEvent(int eventType)

Creates a new AccessibilityEvent with the given eventType.

AccessibilityEvent(AccessibilityEvent event)

Copy constructor.

Public methods

voidappendRecord(AccessibilityRecord record)

Appends an AccessibilityRecord to the end of event records.

intdescribeContents()

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.

static StringeventTypeToString(int eventType)

Returns the string representation of an event type.

intgetAction()

Gets the performed action that triggered this event.

intgetContentChangeTypes()

Gets the bit mask of change types signaled by a TYPE_WINDOW_CONTENT_CHANGED event or TYPE_WINDOW_STATE_CHANGED.

longgetEventTime()

Gets the time in which this event was sent.

intgetEventType()

Gets the event type.

intgetMovementGranularity()

Gets the movement granularity that was traversed.

CharSequencegetPackageName()

Gets the package name of the source.

AccessibilityRecordgetRecord(int index)

Gets the record at a given index.

intgetRecordCount()

Gets the number of records contained in the event.

intgetSpeechStateChangeTypes()

Gets the speech state signaled by a TYPE_SPEECH_STATE_CHANGE event

intgetWindowChanges()

Get the bit mask of change types signaled by a TYPE_WINDOWS_CHANGED event.

voidinitFromParcel(Parcel parcel)

Creates a new instance from a Parcel.

static AccessibilityEventobtain(AccessibilityEvent event)

This method was deprecated in API level Tiramisu. Object pooling has been discontinued. Create a new instance using the constructor AccessibilityEvent() instead.

static AccessibilityEventobtain()

This method was deprecated in API level Tiramisu. Object pooling has been discontinued. Create a new instance using the constructor AccessibilityEvent() instead.

static AccessibilityEventobtain(int eventType)

This method was deprecated in API level Tiramisu. Object pooling has been discontinued. Create a new instance using the constructor AccessibilityEvent() instead.

voidrecycle()

This method was deprecated in API level Tiramisu. Object pooling has been discontinued. Calling this function now will have no effect.

voidsetAction(int action)

Sets the performed action that triggered this event.

voidsetContentChangeTypes(int changeTypes)

Sets the bit mask of node tree changes signaled by an TYPE_WINDOW_CONTENT_CHANGED event.

voidsetEventTime(long eventTime)

Sets the time in which this event was sent.

voidsetEventType(int eventType)

Sets the event type.

voidsetMovementGranularity(int granularity)

Sets the movement granularity that was traversed.

voidsetPackageName(CharSequence packageName)

Sets the package name of the source.

voidsetSpeechStateChangeTypes(int state)

Sets the speech state type signaled by a TYPE_SPEECH_STATE_CHANGE event

StringtoString()

Returns a string representation of the object.

voidwriteToParcel(Parcel parcel, int flags)

Flatten this object in to a Parcel.

Inherited methods

From class android.view.accessibility.AccessibilityRecord
From class java.lang.Object
From interface android.os.Parcelable

Constants

CONTENT_CHANGE_TYPE_CONTENT_DESCRIPTION

Added in API level 19

public static final int CONTENT_CHANGE_TYPE_CONTENT_DESCRIPTION

Change type for TYPE_WINDOW_CONTENT_CHANGED event: The node's content description changed.

Constant Value: 4 (0x00000004)

CONTENT_CHANGE_TYPE_DRAG_CANCELLED

Added in API level 32

public static final int CONTENT_CHANGE_TYPE_DRAG_CANCELLED

Change type for TYPE_WINDOW_CONTENT_CHANGED event: A drag in with accessibility enabled has ended. This means the content has been unsuccessfully dropped, the user has canceled the action via an AccessibilityAction, or no drop has been detected within a timeout and the drag was automatically cancelled. This is sent from the source that initiated the drag.

See also:

Constant Value: 512 (0x00000200)

CONTENT_CHANGE_TYPE_DRAG_DROPPED

Added in API level 32

public static final int CONTENT_CHANGE_TYPE_DRAG_DROPPED

Change type for TYPE_WINDOW_CONTENT_CHANGED event: A drag in with accessibility enabled has ended. This means the content has been successfully dropped. This is sent from the target that accepted the dragged content.

See also:

Constant Value: 256 (0x00000100)

CONTENT_CHANGE_TYPE_DRAG_STARTED

Added in API level 32

public static final int CONTENT_CHANGE_TYPE_DRAG_STARTED

Change type for TYPE_WINDOW_CONTENT_CHANGED event: A drag has started while accessibility is enabled. This is either via an AccessibilityAction, or via touch events. This is sent from the source that initiated the drag.

See also:

Constant Value: 128 (0x00000080)

CONTENT_CHANGE_TYPE_PANE_APPEARED

Added in API level 28

public static final int CONTENT_CHANGE_TYPE_PANE_APPEARED

Change type for TYPE_WINDOW_STATE_CHANGED event: The node has a pane title, and either just appeared or just was assigned a title when it had none before.

Constant Value: 16 (0x00000010)

CONTENT_CHANGE_TYPE_PANE_DISAPPEARED

Added in API level 28

public static final int CONTENT_CHANGE_TYPE_PANE_DISAPPEARED

Change type for TYPE_WINDOW_STATE_CHANGED event: Can mean one of two slightly different things. The primary meaning is that the node has a pane title, and was removed from the node hierarchy. It will also be sent if the pane title is set to null after it contained a title. No source will be returned if the node is no longer on the screen. To make the change more clear for the user, the first entry in AccessibilityRecord.getText() will return the value that would have been returned by getSource().getPaneTitle().

Constant Value: 32 (0x00000020)

CONTENT_CHANGE_TYPE_PANE_TITLE

Added in API level 28

public static final int CONTENT_CHANGE_TYPE_PANE_TITLE

Change type for TYPE_WINDOW_STATE_CHANGED event: The node's pane title changed.

Constant Value: 8 (0x00000008)

CONTENT_CHANGE_TYPE_STATE_DESCRIPTION

Added in API level 30

public static final int CONTENT_CHANGE_TYPE_STATE_DESCRIPTION

Change type for TYPE_WINDOW_CONTENT_CHANGED event: state description of the node as returned by AccessibilityNodeInfo#getStateDescription changed. If part of the state description changes, the changed part can be put into event text. For example, if state description changed from "on, wifi signal full" to "on, wifi three bars", "wifi three bars" can be put into the event text.

Constant Value: 64 (0x00000040)

CONTENT_CHANGE_TYPE_SUBTREE

Added in API level 19

public static final int CONTENT_CHANGE_TYPE_SUBTREE

Change type for TYPE_WINDOW_CONTENT_CHANGED event: One or more content changes occurred in the the subtree rooted at the source node, or the subtree's structure changed when a node was added or removed.

Constant Value: 1 (0x00000001)

CONTENT_CHANGE_TYPE_TEXT

Added in API level 19

public static final int CONTENT_CHANGE_TYPE_TEXT

Change type for TYPE_WINDOW_CONTENT_CHANGED event: The node's text changed.

Constant Value: 2 (0x00000002)

CONTENT_CHANGE_TYPE_UNDEFINED

Added in API level 19

public static final int CONTENT_CHANGE_TYPE_UNDEFINED

Change type for TYPE_WINDOW_CONTENT_CHANGED event: The type of change is not defined.

Constant Value: 0 (0x00000000)

INVALID_POSITION

Added in API level 4

public static final int INVALID_POSITION

Invalid selection/focus position.

See also:

Constant Value: -1 (0xffffffff)

MAX_TEXT_LENGTH

Added in API level 4
Deprecated in API level 15

public static final int MAX_TEXT_LENGTH

Maximum length of the text fields.

See also:

Constant Value: 500 (0x000001f4)

SPEECH_STATE_LISTENING_END

Added in Android Tiramisu

public static final int SPEECH_STATE_LISTENING_END

Change type for TYPE_SPEECH_STATE_CHANGE event: another service is no longer listening to the microphone.

Constant Value: 8 (0x00000008)

SPEECH_STATE_LISTENING_START

Added in Android Tiramisu

public static final int SPEECH_STATE_LISTENING_START

Change type for TYPE_SPEECH_STATE_CHANGE event: another service is listening to the microphone.

Constant Value: 4 (0x00000004)

SPEECH_STATE_SPEAKING_END

Added in Android Tiramisu

public static final int SPEECH_STATE_SPEAKING_END

Change type for TYPE_SPEECH_STATE_CHANGE event: another service is no longer speaking.

Constant Value: 2 (0x00000002)

SPEECH_STATE_SPEAKING_START

Added in Android Tiramisu

public static final int SPEECH_STATE_SPEAKING_START

Change type for TYPE_SPEECH_STATE_CHANGE event: another service is speaking.

Constant Value: 1 (0x00000001)

TYPES_ALL_MASK

Added in API level 4

public static final int TYPES_ALL_MASK

Mask for AccessibilityEvent all types.

See also:

Constant Value: -1 (0xffffffff)

TYPE_ANNOUNCEMENT

Added in API level 16

public static final int TYPE_ANNOUNCEMENT

Represents the event of an application making an announcement.

Constant Value: 16384 (0x00004000)

TYPE_ASSIST_READING_CONTEXT

Added in API level 23

public static final int TYPE_ASSIST_READING_CONTEXT

Represents the event of the assistant currently reading the users screen context.

Constant Value: 16777216 (0x01000000)

TYPE_GESTURE_DETECTION_END

Added in API level 17

public static final int TYPE_GESTURE_DETECTION_END

Represents the event of ending gesture detection.

Constant Value: 524288 (0x00080000)

TYPE_GESTURE_DETECTION_START

Added in API level 17

public static final int TYPE_GESTURE_DETECTION_START

Represents the event of beginning gesture detection.

Constant Value: 262144 (0x00040000)

TYPE_NOTIFICATION_STATE_CHANGED

Added in API level 4

public static final int TYPE_NOTIFICATION_STATE_CHANGED

Represents the event showing a Notification.

Constant Value: 64 (0x00000040)

TYPE_SPEECH_STATE_CHANGE

Added in Android Tiramisu

public static final int TYPE_SPEECH_STATE_CHANGE

Represents a change in the speech state defined by the content-change types. A change in the speech state occurs when another service is either speaking or listening for human speech. This event helps avoid conflicts where two services want to speak or one listens when another speaks.

See also:

Constant Value: 33554432 (0x02000000)

TYPE_TOUCH_EXPLORATION_GESTURE_END

Added in API level 14

public static final int TYPE_TOUCH_EXPLORATION_GESTURE_END

Represents the event of ending a touch exploration gesture.

Constant Value: 1024 (0x00000400)

TYPE_TOUCH_EXPLORATION_GESTURE_START

Added in API level 14

public static final int TYPE_TOUCH_EXPLORATION_GESTURE_START

Represents the event of starting a touch exploration gesture.

Constant Value: 512 (0x00000200)

TYPE_TOUCH_INTERACTION_END

Added in API level 17

public static final int TYPE_TOUCH_INTERACTION_END

Represents the event of the user ending to touch the screen.

Constant Value: 2097152 (0x00200000)

TYPE_TOUCH_INTERACTION_START

Added in API level 17

public static final int TYPE_TOUCH_INTERACTION_START

Represents the event of the user starting to touch the screen.

Constant Value: 1048576 (0x00100000)

TYPE_VIEW_ACCESSIBILITY_FOCUSED

Added in API level 16

public static final int TYPE_VIEW_ACCESSIBILITY_FOCUSED

Represents the event of gaining accessibility focus.

Constant Value: 32768 (0x00008000)

TYPE_VIEW_ACCESSIBILITY_FOCUS_CLEARED

Added in API level 16

public static final int TYPE_VIEW_ACCESSIBILITY_FOCUS_CLEARED

Represents the event of clearing accessibility focus.

Constant Value: 65536 (0x00010000)

TYPE_VIEW_CLICKED

Added in API level 4

public static final int TYPE_VIEW_CLICKED

Represents the event of clicking on a View like Button, CompoundButton, etc.

Constant Value: 1 (0x00000001)

TYPE_VIEW_CONTEXT_CLICKED

Added in API level 23

public static final int TYPE_VIEW_CONTEXT_CLICKED

Represents the event of a context click on a View.

Constant Value: 8388608 (0x00800000)

TYPE_VIEW_FOCUSED

Added in API level 4

public static final int TYPE_VIEW_FOCUSED

Represents the event of setting input focus of a View.

Constant Value: 8 (0x00000008)

TYPE_VIEW_HOVER_ENTER

Added in API level 14

public static final int TYPE_VIEW_HOVER_ENTER

Represents the event of a hover enter over a View.

Constant Value: 128 (0x00000080)

TYPE_VIEW_HOVER_EXIT

Added in API level 14

public static final int TYPE_VIEW_HOVER_EXIT

Represents the event of a hover exit over a View.

Constant Value: 256 (0x00000100)

TYPE_VIEW_LONG_CLICKED

Added in API level 4

public static final int TYPE_VIEW_LONG_CLICKED

Represents the event of long clicking on a View like Button, CompoundButton, etc.

Constant Value: 2 (0x00000002)

TYPE_VIEW_SCROLLED

Added in API level 14

public static final int TYPE_VIEW_SCROLLED

Represents the event of scrolling a view. This event type is generally not sent directly.

See also:

Constant Value: 4096 (0x00001000)

TYPE_VIEW_SELECTED

Added in API level 4

public static final int TYPE_VIEW_SELECTED

Represents the event of selecting an item usually in the context of an AdapterView.

Constant Value: 4 (0x00000004)

TYPE_VIEW_TEXT_CHANGED

Added in API level 4

public static final int TYPE_VIEW_TEXT_CHANGED

Represents the event of changing the text of an EditText.

Constant Value: 16 (0x00000010)

TYPE_VIEW_TEXT_SELECTION_CHANGED

Added in API level 14

public static final int TYPE_VIEW_TEXT_SELECTION_CHANGED

Represents the event of changing the selection in an EditText.

Constant Value: 8192 (0x00002000)

TYPE_VIEW_TEXT_TRAVERSED_AT_MOVEMENT_GRANULARITY

Added in API level 16

public static final int TYPE_VIEW_TEXT_TRAVERSED_AT_MOVEMENT_GRANULARITY

Represents the event of traversing the text of a view at a given movement granularity.

Constant Value: 131072 (0x00020000)

TYPE_WINDOWS_CHANGED

Added in API level 21

public static final int TYPE_WINDOWS_CHANGED

Represents the event change in the system windows shown on the screen. This event type should only be dispatched by the system.

Constant Value: 4194304 (0x00400000)

TYPE_WINDOW_CONTENT_CHANGED

Added in API level 14

public static final int TYPE_WINDOW_CONTENT_CHANGED

Represents the event of changing the content of a window and more specifically the sub-tree rooted at the event's source.

Constant Value: 2048 (0x00000800)

TYPE_WINDOW_STATE_CHANGED

Added in API level 4

public static final int TYPE_WINDOW_STATE_CHANGED

Represents the event of a change to a visually distinct section of the user interface. These events should only be dispatched from Views that have accessibility pane titles, and replaces TYPE_WINDOW_CONTENT_CHANGED for those sources. Details about the change are available from getContentChangeTypes().

Constant Value: 32 (0x00000020)

WINDOWS_CHANGE_ACCESSIBILITY_FOCUSED

Added in API level 28

public static final int WINDOWS_CHANGE_ACCESSIBILITY_FOCUSED

Change type for TYPE_WINDOWS_CHANGED event: The window's AccessibilityWindowInfo#isAccessibilityFocused() changed.

Constant Value: 128 (0x00000080)

WINDOWS_CHANGE_ACTIVE

Added in API level 28

public static final int WINDOWS_CHANGE_ACTIVE

Change type for TYPE_WINDOWS_CHANGED event: The window's AccessibilityWindowInfo#isActive() changed.

Constant Value: 32 (0x00000020)

WINDOWS_CHANGE_ADDED

Added in API level 28

public static final int WINDOWS_CHANGE_ADDED

Change type for TYPE_WINDOWS_CHANGED event: The window was added.

Constant Value: 1 (0x00000001)

WINDOWS_CHANGE_BOUNDS

Added in API level 28

public static final int WINDOWS_CHANGE_BOUNDS

Change type for TYPE_WINDOWS_CHANGED event: The window's bounds changed.

Starting in R, this event implies the window's region changed. It's also possible that region changed but bounds doesn't.

Constant Value: 8 (0x00000008)

WINDOWS_CHANGE_CHILDREN

Added in API level 28

public static final int WINDOWS_CHANGE_CHILDREN

Change type for TYPE_WINDOWS_CHANGED event: The window's children changed.

Constant Value: 512 (0x00000200)

WINDOWS_CHANGE_FOCUSED

Added in API level 28

public static final int WINDOWS_CHANGE_FOCUSED

Change type for TYPE_WINDOWS_CHANGED event: The window's AccessibilityWindowInfo#isFocused() changed.

Constant Value: 64 (0x00000040)

WINDOWS_CHANGE_LAYER

Added in API level 28

public static final int WINDOWS_CHANGE_LAYER

Change type for TYPE_WINDOWS_CHANGED event: The window's layer changed.

Constant Value: 16 (0x00000010)

WINDOWS_CHANGE_PARENT

Added in API level 28

public static final int WINDOWS_CHANGE_PARENT

Change type for TYPE_WINDOWS_CHANGED event: The window's parent changed.

Constant Value: 256 (0x00000100)

WINDOWS_CHANGE_PIP

Added in API level 28

public static final int WINDOWS_CHANGE_PIP

Change type for TYPE_WINDOWS_CHANGED event: The window either entered or exited picture-in-picture mode.

Constant Value: 1024 (0x00000400)

WINDOWS_CHANGE_REMOVED

Added in API level 28

public static final int WINDOWS_CHANGE_REMOVED

Change type for TYPE_WINDOWS_CHANGED event: A window was removed.

Constant Value: 2 (0x00000002)

WINDOWS_CHANGE_TITLE

Added in API level 28

public static final int WINDOWS_CHANGE_TITLE

Change type for TYPE_WINDOWS_CHANGED event: The window's title changed.

Constant Value: 4 (0x00000004)

Fields

CREATOR

Added in API level 4

public static final Creator<AccessibilityEvent> CREATOR

See also:

Public constructors

AccessibilityEvent

Added in API level 30

public AccessibilityEvent ()

Creates a new AccessibilityEvent.

AccessibilityEvent

Added in API level 30

public AccessibilityEvent (int eventType)

Creates a new AccessibilityEvent with the given eventType.

Parameters
eventTypeint: The event type.

AccessibilityEvent

Added in API level 30

public AccessibilityEvent (AccessibilityEvent event)

Copy constructor. Creates a new AccessibilityEvent, and this instance is initialized from the given event.

Parameters
eventAccessibilityEvent: The other event. This value cannot be null.

Public methods

appendRecord

Added in API level 14

public void appendRecord (AccessibilityRecord record)

Appends an AccessibilityRecord to the end of event records.

Parameters
recordAccessibilityRecord: The record to append.

Throws
IllegalStateExceptionIf called from an AccessibilityService.

describeContents

Added in API level 4

public int describeContents ()

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of writeToParcel(android.os.Parcel, int), the return value of this method must include the CONTENTS_FILE_DESCRIPTOR bit.

Returns
inta bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or CONTENTS_FILE_DESCRIPTOR

eventTypeToString

Added in API level 14

public static String eventTypeToString (int eventType)

Returns the string representation of an event type. For example, TYPE_VIEW_CLICKED is represented by the string TYPE_VIEW_CLICKED.

Parameters
eventTypeint: The event type

Returns
StringThe string representation.

getAction

Added in API level 16

public int getAction ()

Gets the performed action that triggered this event.

Returns
intThe action.

getContentChangeTypes

Added in API level 19

public int getContentChangeTypes ()

Gets the bit mask of change types signaled by a TYPE_WINDOW_CONTENT_CHANGED event or TYPE_WINDOW_STATE_CHANGED. A single event may represent multiple change types.

Returns
intThe bit mask of change types. One or more of: Value is either 0 or a combination of CONTENT_CHANGE_TYPE_UNDEFINED, CONTENT_CHANGE_TYPE_SUBTREE, CONTENT_CHANGE_TYPE_TEXT, CONTENT_CHANGE_TYPE_CONTENT_DESCRIPTION, CONTENT_CHANGE_TYPE_STATE_DESCRIPTION, CONTENT_CHANGE_TYPE_PANE_TITLE, CONTENT_CHANGE_TYPE_PANE_APPEARED, CONTENT_CHANGE_TYPE_PANE_DISAPPEARED, CONTENT_CHANGE_TYPE_DRAG_STARTED, CONTENT_CHANGE_TYPE_DRAG_DROPPED, and CONTENT_CHANGE_TYPE_DRAG_CANCELLED

getEventTime

Added in API level 4

public long getEventTime ()

Gets the time in which this event was sent.

Returns
longThe event time.

getEventType

Added in API level 4

public int getEventType ()

Gets the event type.

Returns
intThe event type. Value is either 0 or a combination of TYPE_VIEW_CLICKED, TYPE_VIEW_LONG_CLICKED, TYPE_VIEW_SELECTED, TYPE_VIEW_FOCUSED, TYPE_VIEW_TEXT_CHANGED, TYPE_WINDOW_STATE_CHANGED, TYPE_NOTIFICATION_STATE_CHANGED, TYPE_VIEW_HOVER_ENTER, TYPE_VIEW_HOVER_EXIT, TYPE_TOUCH_EXPLORATION_GESTURE_START, TYPE_TOUCH_EXPLORATION_GESTURE_END, TYPE_WINDOW_CONTENT_CHANGED, TYPE_VIEW_SCROLLED, TYPE_VIEW_TEXT_SELECTION_CHANGED, TYPE_ANNOUNCEMENT, TYPE_VIEW_ACCESSIBILITY_FOCUSED, TYPE_VIEW_ACCESSIBILITY_FOCUS_CLEARED, TYPE_VIEW_TEXT_TRAVERSED_AT_MOVEMENT_GRANULARITY, TYPE_GESTURE_DETECTION_START, TYPE_GESTURE_DETECTION_END, TYPE_TOUCH_INTERACTION_START, TYPE_TOUCH_INTERACTION_END, TYPE_WINDOWS_CHANGED, TYPE_VIEW_CONTEXT_CLICKED, TYPE_ASSIST_READING_CONTEXT, and TYPE_SPEECH_STATE_CHANGE

getMovementGranularity

Added in API level 16

public int getMovementGranularity ()

Gets the movement granularity that was traversed.

Returns
intThe granularity.

getPackageName

Added in API level 4

public CharSequence getPackageName ()

Gets the package name of the source.

Returns
CharSequenceThe package name.

getRecord

Added in API level 14

public AccessibilityRecord getRecord (int index)

Gets the record at a given index.

Parameters
indexint: The index.

Returns
AccessibilityRecordThe record at the specified index.

getRecordCount

Added in API level 14

public int getRecordCount ()

Gets the number of records contained in the event.

Returns
intThe number of records.

getSpeechStateChangeTypes

Added in Android Tiramisu

public int getSpeechStateChangeTypes ()

Gets the speech state signaled by a TYPE_SPEECH_STATE_CHANGE event

Returns
int

See also:

getWindowChanges

Added in API level 28

public int getWindowChanges ()

Get the bit mask of change types signaled by a TYPE_WINDOWS_CHANGED event. A single event may represent multiple change types.

Returns
intThe bit mask of change types. Value is either 0 or a combination of WINDOWS_CHANGE_ADDED, WINDOWS_CHANGE_REMOVED, WINDOWS_CHANGE_TITLE, WINDOWS_CHANGE_BOUNDS, WINDOWS_CHANGE_LAYER, WINDOWS_CHANGE_ACTIVE, WINDOWS_CHANGE_FOCUSED, WINDOWS_CHANGE_ACCESSIBILITY_FOCUSED, WINDOWS_CHANGE_PARENT, WINDOWS_CHANGE_CHILDREN, and WINDOWS_CHANGE_PIP

initFromParcel

Added in API level 4

public void initFromParcel (Parcel parcel)

Creates a new instance from a Parcel.

Parameters
parcelParcel: A parcel containing the state of a AccessibilityEvent.

obtain

Added in API level 14
Deprecated in API level Tiramisu

public static AccessibilityEvent obtain (AccessibilityEvent event)

This method was deprecated in API level Tiramisu.
Object pooling has been discontinued. Create a new instance using the constructor AccessibilityEvent() instead.

Instantiates a new AccessibilityEvent instance. The returned instance is initialized from the given event.

Parameters
eventAccessibilityEvent: The other event.

Returns
AccessibilityEventAn instance.

obtain

Added in API level 4
Deprecated in API level Tiramisu

public static AccessibilityEvent obtain ()

This method was deprecated in API level Tiramisu.
Object pooling has been discontinued. Create a new instance using the constructor AccessibilityEvent() instead.

Instantiates a new AccessibilityEvent instance.

Returns
AccessibilityEventAn instance.

obtain

Added in API level 4
Deprecated in API level Tiramisu

public static AccessibilityEvent obtain (int eventType)

This method was deprecated in API level Tiramisu.
Object pooling has been discontinued. Create a new instance using the constructor AccessibilityEvent() instead.

Instantiates a new AccessibilityEvent instance with its type property set.

Parameters
eventTypeint: The event type.

Returns
AccessibilityEventAn instance.

recycle

Added in API level 4
Deprecated in API level Tiramisu

public void recycle ()

This method was deprecated in API level Tiramisu.
Object pooling has been discontinued. Calling this function now will have no effect.

Previously would recycle an instance back to be reused.

setAction

Added in API level 16

public void setAction (int action)

Sets the performed action that triggered this event.

Valid actions are defined in AccessibilityNodeInfo:

Parameters
actionint: The action.

Throws
IllegalStateExceptionIf called from an AccessibilityService.

See also:

setContentChangeTypes

Added in API level 19

public void setContentChangeTypes (int changeTypes)

Sets the bit mask of node tree changes signaled by an TYPE_WINDOW_CONTENT_CHANGED event.

Parameters
changeTypesint: The bit mask of change types. Value is either 0 or a combination of CONTENT_CHANGE_TYPE_UNDEFINED, CONTENT_CHANGE_TYPE_SUBTREE, CONTENT_CHANGE_TYPE_TEXT, CONTENT_CHANGE_TYPE_CONTENT_DESCRIPTION, CONTENT_CHANGE_TYPE_STATE_DESCRIPTION, CONTENT_CHANGE_TYPE_PANE_TITLE, CONTENT_CHANGE_TYPE_PANE_APPEARED, CONTENT_CHANGE_TYPE_PANE_DISAPPEARED, CONTENT_CHANGE_TYPE_DRAG_STARTED, CONTENT_CHANGE_TYPE_DRAG_DROPPED, and CONTENT_CHANGE_TYPE_DRAG_CANCELLED

Throws
IllegalStateExceptionIf called from an AccessibilityService.

See also:

setEventTime

Added in API level 4

public void setEventTime (long eventTime)

Sets the time in which this event was sent.

Parameters
eventTimelong: The event time.

Throws
IllegalStateExceptionIf called from an AccessibilityService.

setEventType

Added in API level 4

public void setEventType (int eventType)

Sets the event type. Note: An event must represent a single event type.

Parameters
eventTypeint: The event type. Value is either 0 or a combination of TYPE_VIEW_CLICKED, TYPE_VIEW_LONG_CLICKED, TYPE_VIEW_SELECTED, TYPE_VIEW_FOCUSED, TYPE_VIEW_TEXT_CHANGED, TYPE_WINDOW_STATE_CHANGED, TYPE_NOTIFICATION_STATE_CHANGED, TYPE_VIEW_HOVER_ENTER, TYPE_VIEW_HOVER_EXIT, TYPE_TOUCH_EXPLORATION_GESTURE_START, TYPE_TOUCH_EXPLORATION_GESTURE_END, TYPE_WINDOW_CONTENT_CHANGED, TYPE_VIEW_SCROLLED, TYPE_VIEW_TEXT_SELECTION_CHANGED, TYPE_ANNOUNCEMENT, TYPE_VIEW_ACCESSIBILITY_FOCUSED, TYPE_VIEW_ACCESSIBILITY_FOCUS_CLEARED, TYPE_VIEW_TEXT_TRAVERSED_AT_MOVEMENT_GRANULARITY, TYPE_GESTURE_DETECTION_START, TYPE_GESTURE_DETECTION_END, TYPE_TOUCH_INTERACTION_START, TYPE_TOUCH_INTERACTION_END, TYPE_WINDOWS_CHANGED, TYPE_VIEW_CONTEXT_CLICKED, TYPE_ASSIST_READING_CONTEXT, and TYPE_SPEECH_STATE_CHANGE

Throws
IllegalStateExceptionIf called from an AccessibilityService.

setMovementGranularity

Added in API level 16

public void setMovementGranularity (int granularity)

Sets the movement granularity that was traversed.

Parameters
granularityint: The granularity.

Throws
IllegalStateExceptionIf called from an AccessibilityService.

setPackageName

Added in API level 4

public void setPackageName (CharSequence packageName)

Sets the package name of the source.

Parameters
packageNameCharSequence: The package name.

Throws
IllegalStateExceptionIf called from an AccessibilityService.

setSpeechStateChangeTypes

Added in Android Tiramisu

public void setSpeechStateChangeTypes (int state)

Sets the speech state type signaled by a TYPE_SPEECH_STATE_CHANGE event

Parameters
stateint

See also:

toString

Added in API level 4

public String toString ()

Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
 

Returns
Stringa string representation of the object.

writeToParcel

Added in API level 4

public void writeToParcel (Parcel parcel, 
                int flags)

Flatten this object in to a Parcel.

Parameters
parcelParcel: The Parcel in which the object should be written. This value cannot be null.

flagsint: Additional flags about how the object should be written. May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of Parcelable.PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES
安卓无障碍AccessibilityService:从恶意滥用窥探系统级自动化实现 本文深入探讨了安卓无障碍服务AccessibilityService的双面性,既可用于辅助视障用户,也可能被恶意应用滥用。文章详细解析了其核心实现机制,包括API交互和视图树访问方式,并揭露了恶意应用的常见攻击手段。同时提供了安全开发实践指南和系统级自动化的正确使用方法,帮助开发者合理利用该技术。 阅读详情

相关推荐

关于Android的Accessibility--自定义View

自定义View 自定义view要处理的accessibility细节 处理方向控制; 处理keyevent中的KEYCODE_ENTER和KEYCODE_DPAD_CENTER 实现accessibility api; sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_CLICKED) sendAccessibilityEventUnchec...

从入门到忘记 2631

AccessibilityEvent常用详解

AccessibilityEvent常用详解 本文是作者在使用android的AccessibilityService时记录使用到的AccessibilityEvent的一些情况,如有错误欢迎指正(dinjet@foxmail.com) 屏幕状态改变事件 AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED 在不同app之间切换时触发,在同一app内进入不...

Dominic2583的博客 3711

别再手动调时间了!用Windows自带的tzutil命令,1分钟搞定时区错误

本文介绍了如何使用Windows自带的tzutil命令快速解决时区错误问题。通过简单的命令行操作,用户可以一键切换时区、查看全球时区代码库,并实现自动化时区同步。相比传统GUI设置,tzutil更可靠且高效,特别适合企业环境批量部署。

weixin_42531494的博客 312

AccessibilityEvent

点开AccessibilityEvent类可以看到一堆的事件类型~ 事件类型    描述 TYPE_VIEW_CLICKED    View被点击 TYPE_VIEW_LONG_CLICKED    View被长按 TYPE_VIEW_SELECTED    View被选中 TYPE_VIEW_FOCUSED    View获得焦点 TYPE_VIEW_TEXT_CHANGED    View文...

sqlaowen的博客 7463

RAGFlow核心引擎DeepDoc之PDF解析大起底

本文深入解析RAGFlow中的deepdoc模块,重点介绍了pdf文档解析器的实现细节。deepdoc包含parser(文档解析器)和vision(视觉处理)两大核心功能,其中pdf解析是最复杂的部分。文章详细剖析了PdfParser类的设计架构,包含PlainParser(基础文本提取)、RAGFlowPdfParser(核心处理流水线)和VisionParser(视觉扩展)三个类,它们通过统一的__call__方法返回标准化结果。还具体讲解了初始化过程如何加载OCR引擎、布局识别模型、表格结构识别器等关

yxkong的专栏 2021

STM32+A4988控制步进电机

基于A4988芯片驱动42步进电机,在STM32F1上进行测试,最高可以实现16细分。

个人博客 4万+

AccessibilityEvent的生成和处理

在 Android 框架层,的生成和处理是通过系统的 UI 框架和辅助功能服务框架密切协作来实现的。这个机制涉及几个关键的部分:UI 组件、辅助功能服务、事件监听和事件分发。

酌沧 2182

数字蓝军智能体关键技术课题研究

本研究提出基于人工智能大模型技术构建智能数字蓝军智能体系统,旨在提升作战模拟推演的智能化水平。系统采用"大模型+小模型"混合架构,整合感知、决策、规划、学习等核心模块,实现动态、智能的作战方案生成。关键技术包括大模型与知识图谱融合、多智能体协同、战场态势数字化表示等。研究成果将形成可复用的垂直领域智能体框架,为军事训练提供智能化对抗平台。该系统不仅能模拟真实对手的决策行为,还能通过自我博弈持续进化,有效增强推演的真实性和对抗性。

weixin_49042442的博客 1546

Android辅助功能(Accessibility)简介

Android辅助功能(Accessibility)简介 Accessibility 由于部分安卓用户在身体的问题致使他们不能看完整的屏幕或者使用触屏,google提供了Accessibility功能和服务帮助这些用户更加简单地操作设备。这其中最主要的一个类就是AccessibilityService,AccessibilityService是一个系统服务,它运行在后台,并且能够收

踏花忆锦年的博客 1万+

AI原生应用中的数据治理:从采集到应用的完整方案

当AI从"辅助工具"进化为"应用核心"(如ChatGPT、智能驾驶系统),传统数据管理方式已无法满足需求:模型需要更精准的训练数据、业务需要更实时的决策支持、法规需要更严格的隐私保护。本文聚焦AI原生应用的数据全生命周期治理(从采集→清洗→标注→存储→应用→归档的完整链路),覆盖技术方案、工具选择和实践要点。本文将按"场景引入→核心概念→技术方案→实战案例→未来趋势"的逻辑展开,重点通过"奶茶店原料管理"类比,解释数据治理的关键环节;结合Python代码演示核心技术(如异常值检测、主动学习标注);

SuperAGI2025 882

dify upload存在SSRF漏洞

Dify 是一个用于构建 AI 应用程序的开源平台。

nnn2188185的博客 1478

android辅助服务api,Android API中文文档AccessibilityService

AndroidAPI中文文档AccessibilityService是本文要介绍的内容,主要是来了解并学习AndroidAPI帮助文档的内容,具体关于Android API内容的详解来看本文。一、Android API结构java.lang.Objectandroid.content.Contextandroid.content.ContextWrapperandroid.app.Servicea...

weixin_28977143的博客 659

NPC 三电平逆变器中点电位平衡算法详解

最常用:零序电压注入(简单、计算量小)最可靠:虚拟空间矢量调制(VSVPWM)及其改进形式(全范围平衡)趋势:结合模型预测控制(MPC)或智能算法(模糊、神经网络)进一步提升动态性能和鲁棒性。NPC 三电平逆变器中点电位平衡算法的 C# 实现示例(零序电压注入法 + 闭环补偿)在 NPC(Neutral Point Clamped)三电平逆变器中,中点电位平衡最常用且易于软件实现的方案是零序电压注入法。

专注于前沿技术的探索与实践,热衷于从代码逻辑、架构设计到行业应用等多维度深挖技术本质。期待在技术之路上与你共同成长~ 323

Android Accessibility安卓辅助功能开发总结

Android Accessibility开发 参考: https://blog.youkuaiyun.com/qq_15784961/article/details/72742199 Android Accessibility是google开放的为无障碍辅助开发的api。 AccessibilityService是一个可以继承的Service类,注册后,系统会把配置监测的应用行为,通知给这个service。 开发步骤: 一、新建类继承AccessibilityService,主要实现下列方法 onAccessibi

get_moon的博客 2891

3、利用预训练卷积神经网络进行特征提取

本文介绍了如何使用预训练的卷积神经网络(如VGG16)进行图像特征提取,并将提取的特征存储在HDF5数据集中,以便后续用于机器学习模型的训练。文章详细阐述了特征提取的原理、HDF5数据格式的优势、HDF5DatasetWriter类的实现、特征提取流程的代码实现以及实际应用案例。通过该方法,可以在多种图像数据集上高效构建高精度的分类模型。

z2a3b4c5d的博客 112

霍尼韦尔SoftMaster使用说明

霍尼韦尔SoftMaster使用说明

Android API中文文档AccessibilityService

Android API中文文档AccessibilityService是本文要介绍的内容,主要是来了解并学习Android API帮助文档的内容,具体关于Android API内容的详解来看本文。 一、Android API结构 java.lang.Object android.content.Context android.content.ContextWrapper ...

thomas0988 427

STM32F407中文手册

STM32f407中文手册 本参考手册面向应用开发人员,提供有关使用 STM32F405xx/07xx、STM32F415xx/17xx、 STM32F42xxx 和 STM32F43xxx 微控制器存储器与外设的完整信息。STM32F405xx/07xx、STM32F415xx/17xx、STM32F42xxx 和 STM32F43xxx 构成一个微 控制器系列,各产品具有不同的存储器大小、封装和外设。有关订购信息以及器件的机械与电气特性,请参见数据手册。有关 ARM Cortex™-M4F 内核的信息,请参见《Cortex™-M4F 技术参考手册》。

Android Accessibility API的研究与应用(一)

Android accessibility Api通常都是用作一些辅助功能,如点击等。但是由于权限问题,存在一定安全上面的问题,例如获取手机屏幕上的信息内容等,下面是官方对AccessibilityEvent的称述: This class represents accessibility events that are sent by the system when something

Programmer_CJC的博客 2333

计算机控制技术及应用

《计算机控制技术及应用》通过总结作者的科研成果和吸收国内外的先进理论、方法和技术,以计算机控制系统的网络化、开放化、智能化和集成化发展趋势为主线索,主要介绍计算机控制系统的基本概念和计算机控制系统的典型形式,计算机控制系统的数学描述与基本分析方法,以及数字PID控制器、最少拍控制系统、达林算法、状态变量设计法等设计方法及其各种改进算法。重点突出计算机控制系统输入输出通道接口的设计方法和典型控制系统的设计案例与实现方法等。

大中型超市收银系统(可直接运行)

光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开

Android无障碍服务深度解析:从原理到实战的自动化开发指南

在Android开发中,系统服务是构建复杂功能的基础组件,它们通过与系统框架的深度交互,为应用提供了扩展能力。其中,AccessibilityService(无障碍服务)作为一种特殊的系统服务,其设计初衷是辅助残障用户,但其底层的事件监听与界面节点操控机制,使其在自动化测试、跨应用操作等工程实践领域展现出巨大技术价值。理解其核心生命周期,特别是onserviceconnected回调的配置时机,以及事件分发处理流程,是确保服务稳定运行的关键。在实际应用场景中,开发者常面临服务保活、内存管理等挑战,这要求对A

weixin_34391445的博客 298

VancedManager无障碍事件:AccessibilityEvent处理

你是否曾在使用Android应用时遇到界面操作无响应、信息提示不及时的问题?对于视障用户而言,这类问题可能直接导致应用无法使用。VancedManager作为一款功能丰富的Android应用管理器,其无障碍事件(AccessibilityEvent)处理机制是保障应用易用性的关键环节。本文将从技术实现角度,详解VancedManager如何通过系统化的事件处理架构,为用户提供流畅稳定的操作体验。 ...

gitblog_00098的博客 436

Android中文api:android.accessibilityservice

android.accessibilityservice: 英文原文:http://developer.android.com/reference/android/accessibilityservice/package-summary.html 版本:Android 4.0 r1 译者署名:Zhao Xing 译者链接:http://blog.youkuaiyun.com/hn307165411 an

snoopy的专栏 4918

Android2.2 API 中文文档系列(3) —— AccessibilityService

前言  关键字: Android API 中文,Android SDK 中文,Android AccessibilityService 详解  本章翻译来自 java_cofi ,他的博客地址:http://java-cofi.javaeye.com/admin,这里本博负责整理和发布,欢迎其他译者一起参与Android API 的中文翻译行动。 声明   欢迎转载,但请保留文章原始出处:)   ...

weixin_34249367的博客 75

android Accessibility service

偶然间看到了这篇文章,http://www.pingwest.com/kill-process-in-a-smart-way/,虽然对百度的产品没有太大的兴趣,但是它的超强加速还是挺吸引人的,想研究一下。文章里面介绍主要是利用辅助功能服务实现的。所以先要了解下辅助功能服务,Accessibility service. 网上关于AccessibilityService的阐述和用法已经很多很详细了,能

hello0370的专栏 3618

深入理解 Android 无障碍服务

三进程模型:你的进程 ↔ system_server ↔ 被监控进程,你和目标应用永不直接通信事件完整链路:View.performClick → ViewRootImpl 异步打包 → AccessibilityManager → system_server 聚合过滤 → 你的 Service四层过滤:事件类型、notificationTimeout(按类型独立计时)、包名、反馈类型,任意一层不过就收不到节点是 Binder 对象:必须 recycle,否则缓慢泄漏系统资源。

weixin_44780781的博客 718

Android黑科技 自动点击

Android 模拟点击功能

wxz的博客 1万+
上一篇: Android AccessibilityService api文档
下一篇: AccessibilityNodeInfo api文档
ActionWind
博客等级 码龄19年 62粉丝 52原创
评论 3
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值