2015-06-23 50 views

回答

0

你的問題確實是一個單獨的問題。

由於該插件不存在,我們可以使用contacts插件來獲取404。如果您使用的是科爾多瓦5+,則可以從npm安裝:cordova plugin add cordova-plugin-contacts如果您使用的是舊版本,請將cordova plugin add org.apache.cordova.contactscordova plugin add https://github.com/apache/cordova-plugin-contacts.git用於不穩定的回購。

這裏是我已經適應從官方文檔的例子,應該返回所有聯繫人:

var options  = new ContactFindOptions(); 
options.filter = ""; //we aren't filtering on anything 
options.multiple = true; 
var fields  = ["*"]; //search all the fields 
navigator.contacts.find(fields, onSuccess, onError, options); 

所以我們使用find方法,在這裏我們所期望的領域傳遞到搜索上,我們的成功和錯誤回調和搜索的選項(這是沒有過濾器和多個結果。

看到官方docs for the contacts plugin here.

+0

非常感謝!!!! –

相關問題