Sub make_new_calendar
'' https://developer.android.com/reference/android/provider/CalendarContract.Calendars
Dim ContentValues1 As ContentValues
ContentValues1.Initialize
ContentValues1.PutInteger(G_CalendarConstants.VISIBLE,1)
ContentValues1.PutString(G_CalendarConstants.ACCOUNT_NAME,"[email protected]")
ContentValues1.PutString(G_CalendarConstants.ACCOUNT_TYPE,"xxxxx.group")
ContentValues1.PutString(G_CalendarConstants.NAME,"Persian Calendar")
ContentValues1.PutString(G_CalendarConstants.CALENDAR_DISPLAY_NAME,"xxxxx Calendar")
ContentValues1.PutInteger(G_CalendarConstants.CALENDAR_COLOR,-3144201)
ContentValues1.PutInteger(G_CalendarConstants.CALENDAR_ACCESS_LEVEL,200)
ContentValues1.PutInteger(G_CalendarConstants.SYNC_EVENTS,1)
ContentValues1.PutString(G_CalendarConstants.CALENDAR_TIME_ZONE,"Asia/Tehran")
ContentValues1.PutString(G_CalendarConstants.ALLOWED_REMINDERS,"0,1,2")
ContentValues1.PutString(G_CalendarConstants.ALLOWED_AVAILABILITY,"0,1")
ContentValues1.PutString(G_CalendarConstants.ALLOWED_ATTENDEE_TYPES,"0,1,2")
ContentValues1.PutString(G_CalendarConstants.OWNER_ACCOUNT,"persiancalendar#[email protected]")
Dim resUri As Uri = ContentResolver1.Insert(G_CalendarConstants.CONTENT_URI,ContentValues1)
Dim calenderID As Int = resUri.ParseId
Log($"calender id is: ${calenderID}"$)
End Sub