Android.AccessibilityServices.AccessibilityServiceFlags Enumeration
Enumerates values returned by several types and taken as a parameter of the AccessibilityServiceInfo.FlagToString member.

Syntax

[System.Flags]
public enum AccessibilityServiceFlags

Remarks

Enumerates values returned by the following: and taken as a parameter of the AccessibilityServiceInfo.FlagToString member.

Members

Member NameDescription
DefaultIf an Android.AccessibilityServices.AccessibilityService is the default for a given type. Default service is invoked only if no package specific one exists. In case of more than one package specific service only the earlier registered is notified.
IncludeNotImportantViews

If this flag is set the system will regard views that are not important for accessibility in addition to the ones that are important for accessibility. That is, views that are marked as not important for accessibility via Android.Views.View.ImportantForAccessibilityNo and views that are marked as potentially important for accessibility via Android.Views.View.ImportantForAccessibilityAuto for which the system has determined that are not important for accessibility, are both reported while querying the window content and also the accessibility service will receive accessibility events from them.

Note: For accessibility services targeting API version Android.OS.Build.VERSION_CODES.JellyBean or higher this flag has to be explicitly set for the system to regard views that are not important for accessibility. For accessibility services targeting API version lower than Android.OS.Build.VERSION_CODES.JellyBean this flag is ignored and all views are regarded for accessibility purposes.

Usually views not important for accessibility are layout managers that do not react to user actions, do not draw any content, and do not have any special semantics in the context of the screen content. For example, a three by three grid can be implemented as three horizontal linear layouts and one vertical, or three vertical linear layouts and one horizontal, or one grid layout, etc. In this context the actual layout mangers used to achieve the grid configuration are not important, rather it is important that there are nine evenly distributed elements.

ReportViewIdsThis flag requests that the Android.Views.Accessibility.AccessibilityNodeInfos obtained by an Android.AccessibilityServices.AccessibilityService contain the id of the source view. The source view id will be a fully qualified resource name of the form "package:id/name", for example "foo.bar:id/my_list", and it is useful for UI test automation. This flag is not set by default.
RequestEnhancedWebAccessibility

This flag requests from the system to enable web accessibility enhancing extensions. Such extensions aim to provide improved accessibility support for content presented in a Android.Webkit.WebView. An example of such an extension is injecting JavaScript from a secure source. The system will enable enhanced web accessibility if there is at least one accessibility service that has this flag set. Hence, clearing this flag does not guarantee that the device will not have enhanced web accessibility enabled since there may be another enabled service that requested it.

Services that want to set this flag have to declare this capability in their meta-data by setting the attribute Android.Resource.Attribute to true, otherwise this flag will be ignored. For how to declare the meta-data of a service refer to AccessibilityService.ServiceMetaData.

RequestFilterKeyEvents

This flag requests from the system to filter key events. If this flag is set the accessibility service will receive the key events before applications allowing it implement global shortcuts. Setting this flag does not guarantee that this service will filter key events since only one service can do so at any given time. This avoids user confusion due to behavior change in case different key filtering services are enabled. If there is already another key filtering service enabled, this one will not receive key events.

Services that want to set this flag have to declare this capability in their meta-data by setting the attribute Android.Resource.Attribute to true, otherwise this flag will be ignored. For how to declare the meta-data of a service refer to AccessibilityService.ServiceMetaData.

RequestTouchExplorationMode

This flag requests that the system gets into touch exploration mode. In this mode a single finger moving on the screen behaves as a mouse pointer hovering over the user interface. The system will also detect certain gestures performed on the touch screen and notify this service. The system will enable touch exploration mode if there is at least one accessibility service that has this flag set. Hence, clearing this flag does not guarantee that the device will not be in touch exploration mode since there may be another enabled service that requested it.

For accessibility services targeting API version higher than Android.OS.Build.VERSION_CODES.JellyBeanMr1 that want to set this flag have to declare this capability in their meta-data by setting the attribute Android.Resource.Attribute.CanRequestTouchExplorationMode to true, otherwise this flag will be ignored. For how to declare the meta-data of a service refer to AccessibilityService.ServiceMetaData.

Services targeting API version equal to or lower than Android.OS.Build.VERSION_CODES.JellyBeanMr1 will work normally, i.e. the first time they are run, if this flag is specified, a dialog is shown to the user to confirm enabling explore by touch.

RetrieveInteractiveWindowsDocumentation for this section has not yet been entered.

Requirements

Namespace: Android.AccessibilityServices
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0