Taal

ContentCaptureSessionVersion Enum

Definition

public enum ContentCaptureSessionVersion
type ContentCaptureSessionVersion = 
Inheritance
ContentCaptureSessionVersion

Fields

Name Value Description
Version1 1

Content Capture Version 1.

The first Content Capture version is an information rich, event based system that attempts to transfer the current view hierarchy from the application process to a system intelligence service through periodic event dumps, e.g. flush(). However, this system can also be resource heavy due to the large number of events it generates.

When this version is returned by getContentCaptureVersion(), developers should use Version 1 APIs to notify the system of view hierarchy changes. Calling Version 2 APIs when the session is configured for Version 1 will result in no-ops.

A list of functions that belong explicitly to Content Capture Version 1: notifyViewAppeared(ViewStructure); notifyViewDisappeared(AutofillId); notifyViewsAppeared(List); notifyViewsDisappeared(AutofillId,long[]); notifyViewTextChanged(AutofillId,CharSequence); flush(); newViewStructure(View); newVirtualViewStructure(AutofillId,long)

Android reference for android.view.contentcapture.ContentCaptureSession.VERSION_1.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Version2 2

Content Capture Version 2.

The second and newer Content Capture takes a more focused and leaner approach to passing the view hierarchy from the application to a system intelligence service. The required information is mostly limited to text on screen and bounding boxes of these text nodes. This version of Content Capture is also significantly more efficient at resource usage and recommended to be the default one for various system intelligence services to use.

When this version is returned by getContentCaptureVersion(), developers should use Version 2 APIs to report node lifecycle and property updates. Calling Version 1 APIs when the session is configured for Version 2 will result in no-ops.

A list of functions that belong explicitly to Content Capture Version 2: notifyNodeAppearedOrChanged(AutofillId,ContentCaptureNodeProperties); notifyNodeDisappeared(AutofillId)

Android reference for android.view.contentcapture.ContentCaptureSession.VERSION_2.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to