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
createIntent(@NonNull Context context, Void input)

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

Uri
parseResult(int resultCode, Intent intent)

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

Inherited methods

From androidx.activity.result.contract.ActivityResultContract
ActivityResultContract.SynchronousResult<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

Added in 1.2.0
public PickContact()

Public methods

createIntent

Added in 1.2.0
public @NonNull Intent createIntent(@NonNull Context context, Void input)

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

parseResult

public Uri parseResult(int resultCode, Intent intent)

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