async Task PlatformAnnotate(NGContact contact, NGAnnotations annotations) { ContactAnnotationOperations winAnnotations = (ContactAnnotationOperations)annotations; if (winAnnotations == ContactAnnotationOperations.None) { winAnnotations = ContactAnnotationOperations.ContactProfile; } // Annotate this contact with a remote ID, which you can then retrieve when the Contact Panel is activated. var contactAnnotation = new ContactAnnotation { ContactId = contact.Id, RemoteId = contact.RemoteId, SupportedOperations = winAnnotations }; // Annotate that this contact can load this app's Contact Panel or Contact Share. var infos = await AppDiagnosticInfo.RequestInfoForAppAsync(); contactAnnotation.ProviderProperties.Add("ContactPanelAppID", infos[0].AppInfo.AppUserModelId); if ((winAnnotations & ContactAnnotationOperations.Share) == ContactAnnotationOperations.Share) { contactAnnotation.ProviderProperties.Add("ContactShareAppID", infos[0].AppInfo.AppUserModelId); } var annotationList = await FindOrRegisterAnnotationList(); await annotationList.TrySaveAnnotationAsync(contactAnnotation); }
public async Task Annotate(NGContact contact, NGAnnotations annotations) { await PlatformAnnotate(contact, annotations); }