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

StartIntentSenderForResult

class StartIntentSenderForResult : ActivityResultContract<IntentSenderRequest!, ActivityResult!>
kotlin.Any
   ↳ androidx.activity.result.contract.ActivityResultContract<androidx.activity.result.IntentSenderRequest, androidx.activity.result.ActivityResult>
   ↳ androidx.activity.result.contract.ActivityResultContracts.StartIntentSenderForResult

An ActivityResultContract that calls Activity#startIntentSender(IntentSender, Intent, int, int, int). This ActivityResultContract takes an IntentSenderRequest, which must be constructed using an IntentSenderRequest.Builder. If the call to Activity#startIntentSenderForResult(IntentSender, int, Intent, int, int, int) throws an android.content.IntentSender.SendIntentException the androidx.activity.result.ActivityResultCallback will receive an ActivityResult with an Activity#RESULT_CANCELED resultCode and whose intent has the action of ACTION_INTENT_SENDER_REQUEST and an extra EXTRA_SEND_INTENT_EXCEPTION that contains the thrown exception.

Summary

Constants
static String

An Intent action for making a request via the Activity#startIntentSenderForResult API.

static String

Key for the extra containing the IntentSenderRequest.

static String

Key for the extra containing the android.content.IntentSender.SendIntentException if the call to Activity#startIntentSenderForResult(IntentSender, int, Intent, int, int, int) fails.

Public constructors

An ActivityResultContract that calls Activity#startIntentSender(IntentSender, Intent, int, int, int).

Public methods
Intent
createIntent(@NonNull context: Context, @NonNull input: IntentSenderRequest)

ActivityResult
parseResult(resultCode: Int, @Nullable intent: Intent?)

Inherited functions

Constants

ACTION_INTENT_SENDER_REQUEST

static val ACTION_INTENT_SENDER_REQUEST: String

An Intent action for making a request via the Activity#startIntentSenderForResult API.

Value: "androidx.activity.result"
                + ".contract.action.INTENT_SENDER_REQUEST"

EXTRA_INTENT_SENDER_REQUEST

static val EXTRA_INTENT_SENDER_REQUEST: String

Key for the extra containing the IntentSenderRequest.

Value: "androidx.activity.result"
                + ".contract.extra.INTENT_SENDER_REQUEST"

EXTRA_SEND_INTENT_EXCEPTION

static val EXTRA_SEND_INTENT_EXCEPTION: String

Key for the extra containing the android.content.IntentSender.SendIntentException if the call to Activity#startIntentSenderForResult(IntentSender, int, Intent, int, int, int) fails.

Value: "androidx.activity.result"
                + ".contract.extra.SEND_INTENT_EXCEPTION"

Public constructors

<init>

StartIntentSenderForResult()

An ActivityResultContract that calls Activity#startIntentSender(IntentSender, Intent, int, int, int). This ActivityResultContract takes an IntentSenderRequest, which must be constructed using an IntentSenderRequest.Builder. If the call to Activity#startIntentSenderForResult(IntentSender, int, Intent, int, int, int) throws an android.content.IntentSender.SendIntentException the androidx.activity.result.ActivityResultCallback will receive an ActivityResult with an Activity#RESULT_CANCELED resultCode and whose intent has the action of ACTION_INTENT_SENDER_REQUEST and an extra EXTRA_SEND_INTENT_EXCEPTION that contains the thrown exception.

Public methods

createIntent

@NonNull fun createIntent(
    @NonNull context: Context,
    @NonNull input: IntentSenderRequest
): Intent

parseResult

@NonNull fun parseResult(
    resultCode: Int,
    @Nullable intent: Intent?
): ActivityResult