共用方式為


CalendarContract.Events.EnterpriseContentUri Property

Definition

The content:// style URL for querying Events 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 Events table in the managed profile. Appending an event id using ContentUris#withAppendedId(Uri, long) specifies a single event.

The following columns are allowed to be queried via this uri: <ul> <li>#_ID</li> <li>#CALENDAR_ID</li> <li>#TITLE</li> <li>#EVENT_LOCATION</li> <li>#EVENT_COLOR</li> <li>#STATUS</li> <li>#DTSTART</li> <li>#DTEND</li> <li>#EVENT_TIMEZONE</li> <li>#EVENT_END_TIMEZONE</li> <li>#DURATION</li> <li>#ALL_DAY</li> <li>#AVAILABILITY</li> <li>#RRULE</li> <li>#RDATE</li> <li>#LAST_DATE</li> <li>#EXRULE</li> <li>#EXDATE</li> <li>#SELF_ATTENDEE_STATUS</li> <li>#DISPLAY_COLOR</li> <li>#CALENDAR_COLOR</li> <li>#VISIBLE</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.Events.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