我有一個奇怪的問題,當我編程方式創建日曆事件 它始終注意生日日曆(型)我沒有,爲什麼它注意到這樣的任何線索。Android的創建日曆事件始終作爲生日
我的代碼使用的是如下:Xamarin C#
ContentResolver cr = ((Activity)Forms.Context).ContentResolver;
ContentValues values = new ContentValues();
String eventUriString = "content://com.android.calendar/events";
//Insert Events in the calendar...
values.Put(CalendarContract.Events.InterfaceConsts.CalendarId, 1);
values.Put(CalendarContract.Events.InterfaceConsts.Title, title);
values.Put(CalendarContract.Events.InterfaceConsts.Status, 1);
values.Put(CalendarContract.Events.InterfaceConsts.Description, description);
values.Put(CalendarContract.Events.InterfaceConsts.Dtstart, GetDateTimeMS(year, month, day, hour, minute));
values.Put(CalendarContract.Events.InterfaceConsts.Dtend, GetDateTimeMS(year, month, day, hour, minute));
values.Put(CalendarContract.Events.InterfaceConsts.AllDay, allday ? "1" : "0");
values.Put(CalendarContract.Events.InterfaceConsts.HasAlarm, hasalarm ? "1" : "0");
values.Put(CalendarContract.Events.InterfaceConsts.EventColor, Android.Graphics.Color.Green);
values.Put(CalendarContract.Events.InterfaceConsts.EventTimezone, "GMT+" + zone + ":00");
values.Put(CalendarContract.Events.InterfaceConsts.EventEndTimezone, "GMT+" + zone + ":00");
cr.Insert(Android.Net.Uri.Parse(eventUriString), values);
請確實有人有任何建議或想法至極可以點我正確的方向?
在此先感謝。