如何使用PhoneGap的

问题描述:

感谢以前的答复,如何使用PhoneGap的

我尝试添加使用手机的差距联系人保存联系人,我用`

var phoneNumbers = []; 
phoneNumbers[0] = new ContactField('work', '1234567890', false); 
phoneNumbers[1] = new ContactField('mobile', '123456789', true); // preferred number 
phoneNumbers[2] = new ContactField('home', '1234567890', false); 
contact.phoneNumbers = phoneNumbers; contact.save(onSaveSuccess,onSaveError);` 

但这个代码保存触点谷歌。取而代之,我想存储在本地联系人存储中。是否有可能在本地存储联系人。

请指导我弄清楚。

谢谢

function writeLocalStorage() 
{ 
    window.localStorage.setItem("Username", "name"); 
    window.localStorage.setItem("ph_no", "no."); 
    //here code for get the item. 
} 

也许你可以根据自己的需求量的改变函数体,我希望它的工作!

更多参见here

+0

感谢您的立即回复。我们如何使用此代码存储联系人。你能简单地解释我吗? – RAAAAM

+0

在Chrome浏览器的帮助下,您可以通过工具 - >开发者工具 - > localstarage->本地文件来查看商店数据 – vikky