Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
public static MettreAJour() {
// on obtient une ref. sur le store en mode "écriture"
Windows.ApplicationModel.Contacts.ContactManager.requestStoreAsync(
Windows.ApplicationModel.Contacts.ContactStoreAccessType.appContactsReadWrite
).done(function (store) {
// on énumère les listes pour vérifier si la notre existe
// déjà : si oui, on l'update sinon on la créé
store.findContactListsAsync().done(function (lists) {
var laListe = null;
for (var i = 0; i < lists.length; i++) {
if (lists[i].displayName == ListeContactSample.listName) {
laListe = lists[i];
}
}
if (laListe == null) {
ListeContactSample.createContactList(store);
}
else {
ListeContactSample.refreshContactList(laListe);
}
});
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment