Compartir a través de


CalendarContract.StartViewCalendarEventInManagedProfile Method

Definition

Starts an activity to view calendar events in the managed profile.

[Android.Runtime.Register("startViewCalendarEventInManagedProfile", "(Landroid/content/Context;JJJZI)Z", "", ApiSince=29)]
public static bool StartViewCalendarEventInManagedProfile (Android.Content.Context context, long eventId, long startMs, long endMs, bool allDay, Android.Content.ActivityFlags flags);
[<Android.Runtime.Register("startViewCalendarEventInManagedProfile", "(Landroid/content/Context;JJJZI)Z", "", ApiSince=29)>]
static member StartViewCalendarEventInManagedProfile : Android.Content.Context * int64 * int64 * int64 * bool * Android.Content.ActivityFlags -> bool

Parameters

context
Context

the context.

eventId
Int64

the id of the event to be viewed. Will be put into #EXTRA_EVENT_ID field of the intent.

startMs
Int64

the start time of the event in milliseconds since epoch. Will be put into #EXTRA_EVENT_BEGIN_TIME field of the intent.

endMs
Int64

the end time of the event in milliseconds since epoch. Will be put into #EXTRA_EVENT_END_TIME field of the intent.

allDay
Boolean

if the event is an all-day event. Will be put into #EXTRA_EVENT_ALL_DAY field of the intent.

flags
ActivityFlags

flags to be set on the intent via Intent#setFlags

Returns

true if the activity is started successfully. false otherwise.

Attributes

Remarks

Starts an activity to view calendar events in the managed profile.

When this API is called, the system will attempt to start an activity in the managed profile with an intent targeting the same caller package. The intent will have its action set to CalendarContract#ACTION_VIEW_MANAGED_PROFILE_CALENDAR_EVENT and contain extras corresponding to the API's arguments. A calendar app intending to support cross-profile events viewing should handle this intent, parse the arguments and show the appropriate UI.

Java documentation for android.provider.CalendarContract.startViewCalendarEventInManagedProfile(android.content.Context, long, long, long, boolean, int).

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