public class

ActivityResultContracts.GetMultipleContents

extends ActivityResultContract<java.lang.String, java.util.List>

 java.lang.Object

androidx.activity.result.contract.ActivityResultContract<java.lang.String, java.util.List>

↳androidx.activity.result.contract.ActivityResultContracts.GetMultipleContents

Overview

An ActivityResultContract to prompt the user to pick one or more a pieces of content, receiving a content:// for each piece of content that allows you to use to access the raw data. By default, this adds to only return content that can be represented as a stream.

The input is the mime type to filter by, e.g. image/*.

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

Summary

Constructors
publicGetMultipleContents()

Methods
public abstract IntentcreateIntent(Context context, java.lang.Object input)

Create an intent that can be used for

public ActivityResultContract.SynchronousResult<java.lang.Object>getSynchronousResult(Context context, java.lang.Object input)

An optional method you can implement that can be used to potentially provide a result in lieu of starting an activity.

public abstract java.lang.ObjectparseResult(int resultCode, Intent intent)

Convert result obtained from to O

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public GetMultipleContents()

Methods

public abstract Intent createIntent(Context context, java.lang.Object input)

Create an intent that can be used for

public ActivityResultContract.SynchronousResult<java.lang.Object> getSynchronousResult(Context context, java.lang.Object input)

An optional method you can implement that can be used to potentially provide a result in lieu of starting an activity.

Returns:

the result wrapped in a ActivityResultContract.SynchronousResult or null if the call should proceed to start an activity.

public abstract java.lang.Object parseResult(int resultCode, Intent intent)

Convert result obtained from to O