Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Adding an Appointment to the Calendar (Android 4+)

$
0
0

I'm trying to add an appointment to the Calendar in Android 4 and up. I have the code below. Everything compiles appropriately. Unfortunately, I get a series of errors shown in monitor when I have it running. The first error that I get in monitor indicates that the error is due to not having a timezon input. When I add a timezone manually, I get the message that a zimezone is only suppossed to be added via the content provider. Anyway, suggestions on how to resolve this are appreciated. Thanks.

        ContentValues eventValues = new ContentValues();

        eventValues.Put(CalendarContract.Events.InterfaceConsts.CalendarId, -1);
        eventValues.Put(CalendarContract.Events.InterfaceConsts.Title,
            currAppointment.Name);
        eventValues.Put(CalendarContract.Events.InterfaceConsts.Description,
            currAppointment.Notes);
        eventValues.Put(CalendarContract.Events.InterfaceConsts.Dtstart,
            dateTimeString);
        var uri = ContentResolver.Insert(CalendarContract.Events.ContentUri,
            eventValues);

Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>