ChooserResult
class ChooserResult : Parcelable
| kotlin.Any | |
| ↳ | android.service.chooser.ChooserResult |
An event reported to a supplied [IntentSender] by the system chooser when an activity is selected or other actions are taken to complete the session.
Summary
| Constants | |
|---|---|
| static Int |
The session was completed by invoking the copy action. |
| static Int |
The session was completed by invoking the edit action. |
| static Int |
The session was completed by selecting an activity to launch. |
| static Int |
An unknown action was taken to complete the session. |
| Inherited constants | |
|---|---|
| Public methods | |
|---|---|
| Int | |
| Boolean | |
| ComponentName? |
Provides the component of the Activity selected for results with type when type is |
| Int |
getType()The type of the result. |
| Int |
hashCode() |
| Boolean |
Whether the selected component was provided by the app from as a shortcut. |
| Unit |
writeToParcel(dest: Parcel, flags: Int)Flatten this object in to a Parcel. |
| Properties | |
|---|---|
| static Parcelable.Creator<ChooserResult!> | |
Constants
CHOOSER_RESULT_COPY
static val CHOOSER_RESULT_COPY: Int
The session was completed by invoking the copy action.
Value: 1CHOOSER_RESULT_EDIT
static val CHOOSER_RESULT_EDIT: Int
The session was completed by invoking the edit action.
Value: 2CHOOSER_RESULT_SELECTED_COMPONENT
static val CHOOSER_RESULT_SELECTED_COMPONENT: Int
The session was completed by selecting an activity to launch.
Value: 0CHOOSER_RESULT_UNKNOWN
static val CHOOSER_RESULT_UNKNOWN: Int
An unknown action was taken to complete the session.
Value: -1Public methods
describeContents
fun describeContents(): Int
| 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 |
equals
fun equals(other: Any?): Boolean
| Parameters | |
|---|---|
obj |
the reference object with which to compare. |
| Return | |
|---|---|
Boolean |
true if this object is the same as the obj argument; false otherwise. |
getSelectedComponent
fun getSelectedComponent(): ComponentName?
Provides the component of the Activity selected for results with type when type is ChooserResult.CHOOSER_RESULT_SELECTED_COMPONENT.
For all other types, this value is null.
| Return | |
|---|---|
ComponentName? |
the component name selected |
getType
fun getType(): Int
The type of the result.
isShortcut
fun isShortcut(): Boolean
Whether the selected component was provided by the app from as a shortcut.
| Return | |
|---|---|
Boolean |
true if the selected component is a shortcut, false otherwise |
writeToParcel
fun writeToParcel(
dest: Parcel,
flags: Int
): Unit
Flatten this object in to a Parcel.
| Parameters | |
|---|---|
dest |
Parcel: This value cannot be null. |
flags |
Int: 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 |