npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@cordova-ohos/cordova-plugin-contacts

v3.0.1

Published

Cordova alipay Plugin

Readme

cordova-plugin-contacts

插件简介

cordova-plugin-contacts 是一款 Cordova 联系人操作插件,提供跨平台、便捷的联系人查询、创建、修改、删除、分享等核心能力。插件支持访问设备系统通讯录,可灵活获取联系人姓名、电话、邮箱、地址等完整信息,也可向通讯录添加新联系人或修改已有联系人,适用于社交应用好友邀请、通讯录导入、联系人备份、分享联系方式等场景,为混合应用提供与原生应用一致的联系人交互体验。

重要提示: 本插件已经被Apache Cordova废弃,主要原因是隐私安全问题,各大应用市场已经禁止访问通讯录,在OHOS系统中,已经禁止三方应用访问通讯录,但是可以提供选择联系人的功能,因此该插件在OHOS系统中仅提供联系人的选择功能

安装与卸载

安装步骤

1. 基础安装(推荐)

# 安装hcordova
npm install -g hcordova

# 基础安装(推荐稳定版)
hcordova plugin add cordova-plugin-contacts

# 指定OHOS平台安装
hcordova plugin add cordova-plugin-contacts --platform ohos



# 从 GitCode 安装(获取最新开发版)

hcordova plugin add https://gitcode.com/OpenHarmony-Cordova/cordova-plugin-contacts.git  --platform ohos

# 安装指定版本
hcordova plugin add [email protected]  --platform ohos

卸载步骤

# 卸载核心插件
hcordova plugin remove cordova-plugin-contacts


# 指定平台卸载
hcordova plugin remove  cordova-plugin-contacts  --platform ohos

选择联系人 API

/**
 * 返回属性说明:
 * id:联系人的唯一Id
 * displayName:显示的姓名
 * name:姓名
 * nickname:昵称
 * phoneNumbers:手机号数组
 * emails:电子邮箱数组
 * addresses:地址数组
*/
function pickContact() {
    navigator.contacts.pickContact(function(contact){
        console.log('The following contact has been selected:' + JSON.stringify(contact));
    },function(err){
        console.log('Error: ' + err);
    });
}

许可证

本插件基于 Apache License 开源,详见 LICENSE 文件。

联系方式

OHOS Cordova https://gitcode.com/OpenHarmony-Cordova/cordova-plugin-contacts

Android/iOS:https://npmjs.com/cordova-plugin-contacts/issues