Share via


ContactsContract.Contacts.EnterpriseContentUri Property

Definition

URI used for getting all contacts from both the calling user and the managed profile that is linked to it.

[Android.Runtime.Register("ENTERPRISE_CONTENT_URI", ApiSince=34)]
public static Android.Net.Uri EnterpriseContentUri { get; }
[<Android.Runtime.Register("ENTERPRISE_CONTENT_URI", ApiSince=34)>]
static member EnterpriseContentUri : Android.Net.Uri

Property Value

Uri
Attributes

Remarks

URI used for getting all contacts from both the calling user and the managed profile that is linked to it.

It supports the same semantics as #CONTENT_URI and returns the same columns.<br> If the calling user has no managed profile, it behaves in the exact same way as #CONTENT_URI.<br> If there is a managed profile linked to the calling user, it will return merged results from both.

Note: this query returns the calling user results before the managed profile results, and this order is not affected by the sorting parameter.

If a result is from the managed profile, the following changes are made to the data: <ul> <li>#PHOTO_THUMBNAIL_URI and #PHOTO_URI will be rewritten to special URIs. Use ContentResolver#openAssetFileDescriptor or its siblings to load pictures from them. <li>#PHOTO_ID and #PHOTO_FILE_ID will be set to null. Don't use them. <li>#_ID and #LOOKUP_KEY will be replaced with artificial values. These values will be consistent across multiple queries, but do not use them in places that do not explicitly say they accept them. If they are used in the selection param in android.content.ContentProvider#query, the result is undefined. <li>In order to tell whether a contact is from the managed profile, use ContactsContract.Contacts#isEnterpriseContactId(long).

Java documentation for android.provider.ContactsContract.Contacts.ENTERPRISE_CONTENT_URI.

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