Phonegap / Cordova: "pickContact" returns nothing on Windows Phone

I'm working on a phone where a user can select a phone number or email from a mobile contact book. I'm using a contacts plugin to achieve this, which works on Android, but on Windows Phone 8, it displays me in a contact book, but after selecting any contact, it returns nothing (verified by posting a warning) without even throwing any errors. Basically I need to select a contact to send sms / email. I am using the following code:

$('.select-contact').bind('click', function () {
    navigator.contacts.pickContact(function(contact){
        alert(JSON.stringify(contact)); // not getting this alert on WP
        if (device.platform == 'Win32NT') {
            // need to write specific code for WP
        } else {
            sendSMS(contact.phoneNumbers[0].value); // checked this is not working on WP
        }
    },function(err){
        alert('Error: ' + err);
    });
});

      

http://plugins.cordova.io/#/package/org.apache.cordova.contacts

Is there a way to achieve this without creating a custom page. Any suggestion would be helpful.

Thanks in advance Jaya

+3
cordova windows-phone-8 phonegap-plugins


source to share


No one has answered this question yet

Check out similar questions:

273
Is there any difference between PhoneGap and Cordova commands?
15
SMS Phonegap 3.0 for Android and iOS
five
Applause and phone calls on Android
2
Invalid Android Phonegap notification
2
Windows Phone 8.1 navigation softkeys covering part of PhoneGap app
2
Phone delay and app purchase for ios
1
Phonegap camera conflicts
1
Cordoba Facebook plugin FB.ui does nothing iOS
0
Phonegap email component does not open mail client
0
cordova plugin won't work



All Articles
Loading...
X
Show
Funny
Dev
Pics