Sdílet prostřednictvím


ContactsContract.Intents.ShowOrCreateContact Field

Definition

Takes as input a data URI with a mailto: or tel: scheme.

[Android.Runtime.Register("SHOW_OR_CREATE_CONTACT")]
public const string ShowOrCreateContact;
[<Android.Runtime.Register("SHOW_OR_CREATE_CONTACT")>]
val mutable ShowOrCreateContact : string

Field Value

Attributes

Remarks

Takes as input a data URI with a mailto: or tel: scheme. If a single contact exists with the given data it will be shown. If no contact exists, a dialog will ask the user if they want to create a new contact with the provided details filled in. If multiple contacts share the data the user will be prompted to pick which contact they want to view.

For mailto: URIs, the scheme specific portion must be a raw email address, such as one built using Uri#fromParts(String, String, String).

For tel: URIs, the scheme specific portion is compared to existing numbers using the standard caller ID lookup algorithm. The number must be properly encoded, for example using Uri#fromParts(String, String, String).

Any extras from the Insert class will be passed along to the create activity if there are no contacts to show.

Passing true for the #EXTRA_FORCE_CREATE extra will skip prompting the user when the contact doesn't exist.

Java documentation for android.provider.ContactsContract.Intents.SHOW_OR_CREATE_CONTACT.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to