Как получить встречи на определенную дату в календаре Exchange? - PullRequest
0 голосов
/ 03 октября 2019

Я использую Exchange, чтобы показать календарь, я могу показать все встречи с этим кодом, но мне нужно показать встречи только в течение одного месяца. Я не знаю, как ввести дату здесь?

fun getExchangeEvents(email: String) {
    val folderView = FolderView(100)
    folderView.traversal = FolderTraversal.Deep
    folderView.propertySet = PropertySet(FolderSchema.FolderClass,
            FolderSchema.DisplayName, FolderSchema.TotalCount, FolderSchema.ParentFolderId)

    val folders = exchangeService?.findFolders(WellKnownFolderName.MsgFolderRoot, folderView)

    var appointmentFolder: Folder ?=null
    for (folder in folders!!.folders)
    {   
        if (folder.folderClass == "IPF.Appointment")
        {
            appointmentFolder = folder
            break
        }
    }
    val items = exchangeService?.findItems(appointmentFolder?.id,
         SearchFilter.ContainsSubstring(AppointmentSchema.Location,email),
            ItemView(min(appointmentFolder!!.totalCount, 5)))
    Log.d("Teeeest0","Test3")

    val itemArrayList = items?.items
    if (itemArrayList != null) {
        for (item in itemArrayList) {
            val appointment = (item as Appointment)
            Log.d("GotAppointment",("Got appointment item subject : "
                    + appointment.location + "\n"
                    + appointment.subject + "\n"))
        }
    }
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...