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

ActivityResult

public final class ActivityResult
extends Object implements Parcelable

java.lang.Object
   ↳ androidx.activity.result.ActivityResult


A container for an activity result as obtained form Activity.onActivityResult(int, int, Intent)

Summary

Inherited constants

Fields

public static final Creator<ActivityResult> CREATOR

Public constructors

ActivityResult(int resultCode, Intent data)

Create a new instance

Public methods

int describeContents()
Intent getData()
int getResultCode()
static String resultCodeToString(int resultCode)

A readable representation of standard activity result codes

String toString()
void writeToParcel(Parcel dest, int flags)

Inherited methods

Fields

CREATOR

public static final Creator<ActivityResult> CREATOR

Public constructors

ActivityResult

public ActivityResult (int resultCode, 
                Intent data)

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

public int describeContents ()

Returns
int

getData

public Intent getData ()

Returns
Intent the intent

getResultCode

public int getResultCode ()

Returns
int the resultCode

resultCodeToString

public static String resultCodeToString (int resultCode)

A readable representation of standard activity result codes

Parameters
resultCode int: the result code

Returns
String RESULT_OK, RESULT_CANCELED, or the number otherwise

toString

public String toString ()

Returns
String

writeToParcel

public void writeToParcel (Parcel dest, 
                int flags)

Parameters
dest Parcel

flags int