class Request : Parcelable

A request object for detecting the language of a piece of text.

Summary

Nested classes

A builder for building TextLanguage requests.

Inherited constants

From class Parcelable

Int CONTENTS_FILE_DESCRIPTOR

Descriptor bit used with describeContents(): indicates that the Parcelable object's flattened representation includes a file descriptor.

Int PARCELABLE_WRITE_RETURN_VALUE

Flag for use with writeToParcel: the object being written is a return value, that is the result of a function such as "Parcelable someFunction()", "void someFunction(out Parcelable)", or "void someFunction(inout Parcelable)". Some implementations may want to release resources at this point.

Public methods
Int

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

String?

Returns the name of the package that sent this request.

Bundle

getExtras()

Returns a bundle containing non-structured extra information about this request.

CharSequence

getText()

Returns the text to process.

Unit

writeToParcel(dest: Parcel, flags: Int)

Flatten this object in to a Parcel.

Properties
static Parcelable.Creator<TextLanguage.Request!>

Public methods

describeContents

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.

Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance.
Value is either 0 or

getCallingPackageName

fun getCallingPackageName(): String?

Returns the name of the package that sent this request. This returns null if no calling package name is set.

fun getExtras(): Bundle

Returns a bundle containing non-structured extra information about this request.

NOTE: Do not modify this bundle.

Return
Bundle This value cannot be null.

Properties

Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Last updated 2026-02-26 UTC.