【问题标题】:How do you specify URLs for Contact.photos?您如何指定 Contact.photos 的 URL?
【发布时间】:2015-08-20 04:43:25
【问题描述】:

https://github.com/apache/cordova-plugin-contacts#contact

我可以将图像文件放在哪里(例如,我可以将它放在 S3 上,还是在资源中随应用一起提供),URL 的正确格式是什么?

var contact = navigator.contacts.create();
contact.photos = [new ContactField('url', URL, true)];
contact.save()

【问题讨论】:

    标签: cordova phonegap-plugins contacts android-contacts cordova-plugins


    【解决方案1】:

    这是您的答案....先生。

    var photos = [];
    
    var ImgUrl="images/Thomas.jpg";
    
    photos[0] = new ContactField('url', ImgUrl,true);
    contact.photos = photos; 
    

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-12-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-11-01
    • 1970-01-01
    • 1970-01-01
    • 2015-03-21
    相关资源
    最近更新 更多