Google 致力于为黑人社区推动种族平等。查看具体举措

ActivityResultContracts.PickContact

public static final class ActivityResultContracts.PickContact
extends ActivityResultContract<Void, Uri>

java.lang.Object
   ↳ androidx.activity.result.contract.ActivityResultContract<java.lang.Void, android.net.Uri>
     ↳ androidx.activity.result.contract.ActivityResultContracts.PickContact


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

The result is a content: Uri.

See also:

Summary

Public constructors

PickContact()

Public methods

Intent createIntent(Context context, Void input)

Create an intent that can be used for Activity.startActivityForResult(Intent, int)

Uri parseResult(int resultCode, Intent intent)

Convert result obtained from Activity.onActivityResult(int, int, Intent) to O

Inherited methods

Public constructors

PickContact

public PickContact ()

Public methods

createIntent

public Intent createIntent (Context context, 
                Void input)

Create an intent that can be used for Activity.startActivityForResult(Intent, int)

Parameters
context Context

input Void

Returns
Intent

parseResult

public Uri parseResult (int resultCode, 
                Intent intent)

Convert result obtained from Activity.onActivityResult(int, int, Intent) to O

Parameters
resultCode int

intent Intent

Returns
Uri