Google は、黒人コミュニティに対する人種平等の促進に取り組んでいます。取り組みを見る

ActivityResult

class ActivityResult : Parcelable
kotlin.Any
   ↳ androidx.activity.result.ActivityResult

A container for an activity result as obtained form Activity#onActivityResult

Summary

Public constructors
<init>(resultCode: Int, @Nullable data: Intent?)

Create a new instance

Public methods
Int

Intent?

Int

static String
resultCodeToString(resultCode: Int)

A readable representation of standard activity result codes

String

Unit
writeToParcel(@NonNull dest: Parcel, flags: Int)

Extension functions
From androidx.activity.result
operator Int

Destructuring declaration for ActivityResult to provide the requestCode

operator Intent?

Destructuring declaration for ActivityResult to provide the intent

Properties
static Creator<ActivityResult!>

Public constructors

<init>

ActivityResult(
    resultCode: Int,
    @Nullable data: Intent?)

Create a new instance

Parameters
resultCode Int: status to indicate the success of the operation
data Intent?: an intent that carries the result data

Public methods

describeContents

fun describeContents(): Int

getData

@Nullable fun getData(): Intent?
Return
Intent? the intent

getResultCode

fun getResultCode(): Int
Return
Int the resultCode

resultCodeToString

@NonNull static fun resultCodeToString(resultCode: Int): String

A readable representation of standard activity result codes

Parameters
resultCode Int: the result code
Return
String RESULT_OK, RESULT_CANCELED, or the number otherwise

toString

fun toString(): String

writeToParcel

fun writeToParcel(
    @NonNull dest: Parcel,
    flags: Int
): Unit

Properties

CREATOR

@NonNull static val CREATOR: Creator<ActivityResult!>