locked
retrieving contacts in metro apps

    Question

  • i am using below snippet to retrieve contacts

    varpicker = Windows.ApplicationModel.Contacts.ContactPicker();           

                picker.commitButtonText =

    "Select";

                picker.selectionMode = Windows.ApplicationModel.Contacts.ContactSelectionMode.fields;

                picker.desiredFields.append(Windows.ApplicationModel.Contacts.KnownContactField.email);           

                picker.pickSingleContactAsync().then(

    function(contact) {

                   

    varcontactElement = document.createElement("div");

                    contactElement.innerText = contact.name +

    " "+ contact.emails[0].value;

                    document.body.appendChild(contactElement);

                });

    on executing on simulator I get people app launching with below error "something went wrong and this app can't pick contacts right now". running the code as Local machine runs well. any idea how to simulate the above code on simulator, the app is targeted for tablet devices.

    appreciate your support


    thanks & regards chandresh soni

    Friday, September 14, 2012 4:17 AM

Answers

  • Hi

    It's weird.

    You can try to close your local application and unstall it form your start menu, then run it on simulator again.

    • Marked as answer by Dino He Monday, September 24, 2012 7:42 AM
    Monday, September 17, 2012 2:15 AM