Hi i'm unable to save the contacts in my windows phone 8 emulator permanently.contacts are saving just for a temporary period in people app.when i open that emulator and save contacts in it. They are getting saved but when i close that emulator and again reopened..no any contacts are showing in that people app .I want to import that contacts in my app for sending some info.but i cant proceed as its not showing any contacts in it.I gone through phonegap tutorial tried this code also.
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
var contact = navigator.contacts.create();
contact.displayName = "xyz";
var name = new ContactName();
name.givenName = "abc";
contact.name = name;
contact.save(onSaveSuccess,onSaveError);
function onSaveSuccess(contact) {
alert("Save Success");
}
function onSaveError(contactError) {
alert("Error = " + contactError.code);
}
AFAIK you can't do that because WP8 API doesn't allow that. You only have Read-only access to Contact API.
See the documentation .
EDIT: After reading a little more about your issues I found this one . So I think that your problem is with emulator only, that doesn't persist data after turned off.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.