ActivityResultContracts.PickContact

public final class ActivityResultContracts.PickContact extends ActivityResultContract


An ActivityResultContract to request the user to pick a contact from the contacts app.

The result is a content:Uri.

See also
ContactsContract

Summary

Public constructors

Public methods

@NonNull Intent

Create an intent that can be used for android.app.Activity.startActivityForResult.

@Nullable Uri
parseResult(int resultCode, @Nullable Intent intent)

Convert result obtained from android.app.Activity.onActivityResult to O.

Inherited methods

From class ActivityResultContract
@Nullable ActivityResultContract.SynchronousResult<@NonNull Uri>

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

Public constructors

PickContact

public final PickContact()

Public methods

createIntent

@NonNull
public Intent createIntent(@NonNull Context context, @Nullable Void input)

Create an intent that can be used for android.app.Activity.startActivityForResult.

parseResult

@Nullable
public Uri parseResult(int resultCode, @Nullable Intent intent)

Convert result obtained from android.app.Activity.onActivityResult to O.