AssistStructure
open class AssistStructure : Parcelable
kotlin.Any | |
↳ | android.app.assist.AssistStructure |
This API automatically creates assist data from the platform's implementation of assist and autofill.
The structure is used for assist purposes when created by android.app.Activity#onProvideAssistData
, View.onProvideStructure(ViewStructure)
, or View.onProvideVirtualStructure(ViewStructure)
.
The structure is also used for autofill purposes when created by View.onProvideAutofillStructure(ViewStructure, int)
, or View.onProvideAutofillVirtualStructure(ViewStructure, int)
.
For performance reasons, some properties of the assist data might only be available for assist or autofill purposes. In those cases, a property's availability will be documented in its javadoc.
To learn about using Autofill in your app, read the Autofill Framework guides.
Summary
Nested classes | |
---|---|
open |
Describes a single view in the assist data. |
open |
Describes a window in the assist data. |
Inherited constants | |
---|---|
Public constructors | |
---|---|
Public methods | |
---|---|
open Int | |
open Long |
Returns the time when the activity finished generating assist data to build the AssistStructure. |
open Long |
Returns the time when the activity started generating assist data to build the AssistStructure. |
open ComponentName! |
Return the activity this AssistStructure came from. |
open AssistStructure.WindowNode! |
getWindowNodeAt(index: Int) Return one of the windows in the assist data. |
open Int |
Return the number of window contents that have been collected in this assist data. |
open Boolean |
Returns whether the activity associated with this AssistStructure was the home activity (Launcher) at the time the assist data was acquired. |
open Unit |
writeToParcel(out: Parcel, flags: Int) |
Properties | |
---|---|
static Parcelable.Creator<AssistStructure!> |
Public constructors
Public methods
describeContents
open fun describeContents(): Int
Return | |
---|---|
Int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR |
getAcquisitionEndTime
open fun getAcquisitionEndTime(): Long
Returns the time when the activity finished generating assist data to build the AssistStructure. The time is as specified by SystemClock.uptimeMillis()
.
Return | |
---|---|
Long |
Returns the acquisition end time of the assist data, in milliseconds. |
See Also
getAcquisitionStartTime
open fun getAcquisitionStartTime(): Long
Returns the time when the activity started generating assist data to build the AssistStructure. The time is as specified by SystemClock.uptimeMillis()
.
Return | |
---|---|
Long |
Returns the acquisition start time of the assist data, in milliseconds. |
See Also
getActivityComponent
open fun getActivityComponent(): ComponentName!
Return the activity this AssistStructure came from.
getWindowNodeAt
open fun getWindowNodeAt(index: Int): AssistStructure.WindowNode!
Return one of the windows in the assist data.
Parameters | |
---|---|
index |
Int: Which window to retrieve, may be 0 to getWindowNodeCount() -1. |
getWindowNodeCount
open fun getWindowNodeCount(): Int
Return the number of window contents that have been collected in this assist data.
isHomeActivity
open fun isHomeActivity(): Boolean
Returns whether the activity associated with this AssistStructure was the home activity (Launcher) at the time the assist data was acquired.
Return | |
---|---|
Boolean |
Whether the activity was the home activity. |
See Also
writeToParcel
open fun writeToParcel(
out: Parcel,
flags: Int
): Unit
Parameters | |
---|---|
dest |
The Parcel in which the object should be written. This value cannot be null . |
flags |
Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE . Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE , and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES |