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

TakePicture

class TakePicture : ActivityResultContract<Uri!, Boolean!>
kotlin.Any
   ↳ androidx.activity.result.contract.ActivityResultContract<android.net.Uri, kotlin.Boolean>
   ↳ androidx.activity.result.contract.ActivityResultContracts.TakePicture

An ActivityResultContract to take a picture saving it into the provided content-Uri.

Returns true if the image was saved into the given Uri.

This can be extended to override createIntent if you wish to pass additional extras to the Intent created by super.createIntent().

Summary

Public constructors

An ActivityResultContract to take a picture saving it into the provided content-Uri.

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

ActivityResultContract.SynchronousResult<Boolean!>?
getSynchronousResult(@NonNull context: Context, @NonNull input: Uri)

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

Public constructors

<init>

TakePicture()

An ActivityResultContract to take a picture saving it into the provided content-Uri.

Returns true if the image was saved into the given Uri.

This can be extended to override createIntent if you wish to pass additional extras to the Intent created by super.createIntent().

Public methods

createIntent

@CallSuper @NonNull open fun createIntent(
    @NonNull context: Context,
    @NonNull input: Uri
): Intent

getSynchronousResult

@Nullable fun getSynchronousResult(
    @NonNull context: Context,
    @NonNull input: Uri
): ActivityResultContract.SynchronousResult<Boolean!>?

parseResult

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