Request

class Request : Parcelable
kotlin.Any
   ↳ android.view.textclassifier.TextClassification.Request

A request object for generating TextClassification.
Requires API level 28 (Android 8.+, P)

Summary

Nested classes

A builder for building TextClassification requests.

Inherited constants
Public methods
ZonedDateTime?


Requires API level 28 (Android 8.+, P)

CharSequence

Returns the text providing context for the text to classify (which is specified by the sub sequence starting at startIndex and ending at endIndex)
Requires API level 28 (Android 8.+, P)

Unit
writeToParcel(dest: Parcel!, flags: Int)

Flatten this object in to a Parcel.

LocaleList?


Requires API level 28 (Android 8.+, P)

Int

Returns start index of the text to classify.

Int

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

Int

Returns end index of the text to classify.

Properties
static Parcelable.Creator<TextClassification.Request!>!

Requires API level 28 (Android 8.+, P)

Public methods

getReferenceTime

added in API level 28
fun getReferenceTime(): ZonedDateTime?


Requires API level 28 (Android 8.+, P)

Return
ZonedDateTime?: reference time based on which relative dates (e.g. "tomorrow") should be interpreted. This value may be null.

getText

added in API level 28
fun getText(): CharSequence

Returns the text providing context for the text to classify (which is specified by the sub sequence starting at startIndex and ending at endIndex)
Requires API level 28 (Android 8.+, P)

Return
CharSequence: This value will never be null.

writeToParcel

added in API level 28
fun writeToParcel(dest: Parcel!, flags: Int): Unit

Flatten this object in to a Parcel. Requires API level 28 (Android 8.+, P)

Parameters
dest Parcel!: The Parcel in which the object should be written.
flags Parcel!: 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

getDefaultLocales

added in API level 28
fun getDefaultLocales(): LocaleList?


Requires API level 28 (Android 8.+, P)

Return
LocaleList?: ordered list of locale preferences that can be used to disambiguate the provided text. This value may be null.

getStartIndex

added in API level 28
fun getStartIndex(): Int

Returns start index of the text to classify.
Requires API level 28 (Android 8.+, P)

Return
Int: Value is 0 or greater

describeContents

added in API level 28
fun describeContents(): Int

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(Parcel, int), the return value of this method must include the #CONTENTS_FILE_DESCRIPTOR bit. Requires API level 28 (Android 8.+, P)

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

getEndIndex

added in API level 28
fun getEndIndex(): Int

Returns end index of the text to classify.
Requires API level 28 (Android 8.+, P)

Return
Int: Value is 0 or greater

Properties

CREATOR

added in API level 28
static val CREATOR: Parcelable.Creator<TextClassification.Request!>!

Requires API level 28 (Android 8.+, P)