ActivityResult


class ActivityResult : Parcelable


A container for an activity result as obtained from Activity.onActivityResult

See also
onActivityResult

Summary

Public companion functions

String
resultCodeToString(resultCode: Int)

A readable representation of standard activity result codes for the given resultCode

Public companion properties

Parcelable.Creator<ActivityResult>

Public constructors

ActivityResult(resultCode: Int, data: Intent?)

Public functions

open Int
open String
open Unit
writeToParcel(dest: Parcel, flags: Int)

Public properties

Intent?

The intent that carries the result data

Int

Status to indicate the success of the operation

Extension functions

operator Int

Destructuring declaration for ActivityResult to provide the requestCode

operator Intent?

Destructuring declaration for ActivityResult to provide the intent

Public companion functions

resultCodeToString

Added in 1.9.0
fun resultCodeToString(resultCode: Int): String

A readable representation of standard activity result codes for the given resultCode

Returns
String

RESULT_OK, RESULT_CANCELED, or the number otherwise

Public companion properties

Public constructors

ActivityResult

Added in 1.2.0
ActivityResult(resultCode: Int, data: Intent?)

Public functions

describeContents

Added in 1.2.0
open fun describeContents(): Int

toString

open fun toString(): String

writeToParcel

Added in 1.2.0
open fun writeToParcel(dest: Parcel, flags: Int): Unit

Public properties

data

Added in 1.2.0
val dataIntent?

The intent that carries the result data

resultCode

Added in 1.2.0
val resultCodeInt

Status to indicate the success of the operation

Extension functions

operator fun ActivityResult.component1(): Int

Destructuring declaration for ActivityResult to provide the requestCode

Returns
Int

the resultCode of the ActivityResult

operator fun ActivityResult.component2(): Intent?

Destructuring declaration for ActivityResult to provide the intent

Returns
Intent?

the intent of the ActivityResult