共用方式為


CalendarContract.Calendars.EnterpriseContentUri Property

Definition

The content:// style URL for querying Calendars table in the managed profile.

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

Property Value

Uri
Attributes

Remarks

The content:// style URL for querying Calendars table in the managed profile. Appending a calendar id using ContentUris#withAppendedId(Uri, long) specifies a single calendar.

The following columns are allowed to be queried via this uri: <ul> <li>#_ID</li> <li>#CALENDAR_COLOR</li> <li>#VISIBLE</li> <li>#CALENDAR_LOCATION</li> <li>#CALENDAR_TIME_ZONE</li> <li>#IS_PRIMARY</li> </ul>

IllegalArgumentException is thrown if there exists columns in the projection of the query to this uri that are not contained in the above list.

This uri returns an empty cursor if the calling user is not a parent profile of a managed profile, or the managed profile is disabled, or cross-profile calendar is disabled in Settings, or this uri is queried from a package that is not allowed by the profile owner of the managed profile via DevicePolicyManager#setCrossProfileCalendarPackages(ComponentName, Set).

Apps can register a android.database.ContentObserver for this URI to listen to changes.

Java documentation for android.provider.CalendarContract.Calendars.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