title: Add event to calendar programmatically
body: <p>I develop event manager. There are events with date/time of start and end.
  I need to implement opportunity to insert my in-app events to the android calendar.</p>
  
  <p>Here is code I wrote:</p>
  
  <pre><code>val startMillis: Long = 1555406400000
      val endMillis: Long = 1555499400000
      val name = "Event"
      val description = "Awesome event"
      val allDay = false
  
      val values = ContentValues().apply {
        put(CalendarContract.Events.DTSTART, startMillis)
        put(CalendarContract.Events.DTEND, endMillis)
        put(CalendarContract.Events.TITLE, name)
        put(CalendarContract.Events.DESCRIPTION, description)
        put(CalendarContract.Events.ALL_DAY, allDay)
        put(CalendarContract.Events.CALENDAR_ID, 3) //Don't know why `3`, just copied from some example from inthernet
        put(CalendarContract.Events.EVENT_TIMEZONE, ZonedDateTime.now().zone.id)
      }
  
      val contentUri = CalendarContract.Events.CONTENT_URI
      activity.contentResolver.insert(contentUri, values)
  </code></pre>
  
  <p>This code works perfectly on the Android 5.0 device (Event is appears in the calendar app), but doesn't work on the 7.0 device. <code>WRITE_CALENDAR</code> and <code>READ_CALENDAR</code> permissions are granted.</p>
  
  <p>Whats wrong with my code? Why it doesn't works on the Android 7.0?</p>