首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在UWP AppointmentManager中,Appointment.Invitees始终为空

在UWP AppointmentManager中,Appointment.Invitees始终为空
EN

Stack Overflow用户
提问于 2017-10-13 17:38:57
回答 1查看 67关注 0票数 0

具有参与者的约会在查询是否使用appointment.Invitees属性时始终返回空集合。

这就是我要做的,

代码语言:javascript
复制
var calendarStore = await AppointmentManager.RequestStoreAsync(AppointmentStoreAccessType.AllCalendarsReadOnly);
var appointments = await calendarStore.FindAppointmentsAsync(DateTimeOffset.Now, TimeSpan.FromDays(30), new FindAppointmentsOptions() { IncludeHidden = true });
foreach (var appointment in appointments)
{
    // appointment.Invitees is always null, even for appointments that has some! 
    foreach (var invitee in appointment.Invitees)
    {
        // do something here...
    }
}

我尝试在约会之外添加联系人功能,但徒劳无功。有没有想过为什么会有这么奇怪的行为?

EN

回答 1

Stack Overflow用户

发布于 2017-10-16 16:23:55

访问Invitees属性时,appointmentsSystem功能是必需的。

代码语言:javascript
复制
 <Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
         xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
         xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
         xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
     IgnorableNamespaces="uap mp rescap">

<Capabilities>
    <Capability Name="internetClient"/>
    <uap:Capability Name="appointments" />
    <uap:Capability Name="contacts" />
    <rescap:Capability Name="appointmentsSystem" />   
 </Capabilities>

任何人都不能请求访问此功能以提交商店

请注意,appointmentsSystem在商店应用程序中是无用的。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/46726927

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档