Android   发布时间:2022-04-28  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了android – cordova-plugin-contacts-没有获取所有活动日期大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

我使用以下代码使用联系人插件“cordova-plugin-contacts”获取联系人和联系人详细信息

var options = new ContactFindoptions();
options.filter = "";
options.multiple = true;
var fields = ["*"];
navigator.contacts.find(fields,onsuccessContact,onErrorContact,options);

我无获取像这样的事件日期

>周年纪念
>自定义
>其他

如何获得这些领域?

最佳答案
联系人插件只返回少数字段,请参阅https://github.com/apache/cordova-plugin-contacts#properties

ios设备不支持android中支持的一些属性.参设备特定的怪癖https://github.com/apache/cordova-plugin-contacts#android-2x-quirks

您可以获取生日,显示名称,ID,phonenumbers等字段.但
没有类型周年纪念日,定制等领域的支持.
您可以使用类别字段获取与联系人关联的用户定义类别.

// find all contacts with 'Bob' in any name field
var options = new ContactFindoptions();
options.filter = "Bob";
options.multiple = true;
// Contact fields to be returned BACk.
options.desiredFields = [navigator.contacts.fieldType.id,navigator.contacts.fieldType.birthday];
options.hasPhonenumber = true;
var fields = [navigator.contacts.fieldType.displayName,navigator.contacts.fieldType.name];
navigator.contacts.find(fields,onsuccess,onError,options);

大佬总结

以上是大佬教程为你收集整理的android – cordova-plugin-contacts-没有获取所有活动日期全部内容,希望文章能够帮你解决android – cordova-plugin-contacts-没有获取所有活动日期所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。