0.2.4 • Published 3 years ago

react-native-contact-list v0.2.4

Weekly downloads
3
License
MIT
Repository
github
Last release
3 years ago

react-native-contact-list

get contact list from user device

Installation

npm install react-native-contact-list

Usage

Android

AndroidManifest.xml

<uses-permission android:name="android.permission.READ_CONTACTS" />

iOS

Info.plist

<key>NSContactsUsageDescription</key>
<string>연락처를 쓰겠습니다.</string>

Example

import ContactList, { Contact } from "react-native-contact-list";

// ...

function App() {
    const [contactList, setContactList] = React.useState<Contact[]>([]);
    const getContactList = async () => {
        try {
        const isPermissionAuthorized = await ContactList.checkPermission();
        if (isPermissionAuthorized === 'authorized') {
            setContactList(await ContactList.getContactList());
        } else {
            const permissionResult = await ContactList.requestPermission();
            if (permissionResult === 'authorized') {
            setContactList(await ContactList.getContactList());
            } else {
            // todo: PERMISSION DENIED EXCEPTION
            console.log('todo: PERMISSION DENIED EXCEPTION');
            }
        }
        } catch (e) {
        console.error();
        }
    };
    ...
    render() {
        ...
    }
}

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

JSONStreamacornababacceptsabsolute-pathacorn-jsxabort-controlleraggregate-erroracorn-walkajvacorn-globalsadd-streamanseransi-cyanansi-alignansi-colorsansi-escapesansi-regexansi-stylesansi-fragmentsansi-redansi-grayansi-wrapanymatcharr-diffargparsearray-find-indexarray-includesarr-unionarray-ifyarr-flattenarray-filterarray-unionarray.prototype.flatmaparray-slicearrifyarray-uniquearray-maparray-reduceasapassign-symbolsasn1assert-plusastral-regexasyncasync-retryatobaws4babel-eslintat-least-nodeaws-sign2babel-plugin-dynamic-import-nodebabel-polyfillbabel-plugin-istanbulasynckitbabel-preset-fbjsbabel-plugin-syntax-trailing-function-commasbabel-preset-current-node-syntaxbabel-plugin-jest-hoistbalanced-matchbasebabel-runtimebabel-preset-jestbase64-jsbindingsbcrypt-pbkdfbefore-after-hookbig-integerbrace-expansionbplist-parserboxenbracesbrowserslistbrowser-process-hrtimebserbuffer-crc32buffer-frombuiltinsbplist-creatorbabel-jestcacheable-lookupbytescallsitescaller-pathcamelcase-keyscaller-callsitecacheable-requestcaniuse-litechalkcache-basecapture-exitcamelcasecaselesschangelog-filename-regexchar-regexci-infochardetclean-stackcli-cursorcli-spinnerscli-boxesclass-utilscliuicli-widthcloneclone-responsecolor-namecocollection-visitcolor-supportcolorettecolor-convertcombined-streamcommandercommand-existscommondircompare-funccollect-v8-coveragecomponent-emitterconcat-mapcompare-versionscompressionconcat-streamcompressibleconventional-changelog-conventionalcommitsconfigstoreconventional-changelogconnectconventional-changelog-angularconventional-changelog-codemirrorconventional-changelog-coreconventional-changelog-eslintconventional-changelog-atomconventional-changelog-jshintconventional-changelog-expressconventional-changelog-preset-loaderconventional-commits-parserconventional-changelog-jqueryconventional-changelog-emberconventional-commits-filterconventional-recommended-bumpconvert-source-mapcore-util-iscosmiconfigcore-jscopy-descriptorconventional-changelog-writercore-js-compatcsstypecssomcreate-react-classcrypto-random-stringcurrently-unhandledcross-spawncssstyledargsdecamelize-keysdecamelizedashdashdateformatdata-urlsdebugdayjsdecimal.jsdecode-uri-componentdecompress-responsedeep-isdeep-extenddefine-propertiesdeepmergededentdefaultsdefine-propertydefer-to-connectdenodeifydelayed-streamdeldepddeprecated-objdestroydetect-newlinedetect-repo-changelogdoctrinedeprecationdir-globdiff-sequencesdomexceptiondot-propduplexer3ejsee-firstecc-jsbnelectron-to-chromiumemitteryencodeurlend-of-streamemoji-regexenvinfoerror-exencodingerrorhandlerenquirerescaladeescape-goatescape-htmles-to-primitiveescape-string-regexpeslint-plugin-flowtypees-abstracteslint-plugin-eslint-commentseslint-plugin-react-hookseslint-plugin-react-nativeeslint-plugin-jesteslint-plugin-reacteslint-plugin-react-native-globalseslint-utilseslint-scopeespreeeslint-visitor-keysesrecurseesprimaesqueryeslint-plugin-relayescodegenestraverseesutilsexec-shetagevent-target-shimeventemitter3execaextendexpand-bracketsexternal-editorexitextend-shallowfast-deep-equalextglobfast-difffast-json-stable-stringifyfancy-logfb-watchmanextsprintffast-levenshteinfast-globfastqfbjsfbjs-scriptsfile-uri-to-pathfbjs-css-varsfile-entry-cachefiguresfilelistfill-rangefind-upfinalhandlerfind-versionsfind-cache-dirflat-cacheflattedflatfor-inforever-agentform-datafs.realpathfseventsfunction-bindfunctional-red-black-treefragment-cachegensyncfreshfs-extraget-caller-fileget-streamget-package-typeget-stdinget-valueget-pkg-repogit-raw-commitsgh-gotgetpassgit-semver-tagsgit-remote-origin-urlglob-parentglobgit-upglobal-dirsglobalsgithub-usernamegitconfiglocalgit-url-parsegraceful-fsgotgrowlygraphqlglobbyhandlebarshas-symbolshas-flaghar-schemahashard-rejectionhar-validatorhas-valueshas-valuehas-yarnhosted-git-infohermes-enginehttp-cache-semanticshermes-profile-transformerhtml-encoding-snifferhtml-escaperhttp2-wrapperhttp-errorsignoreiconv-litehuman-signalsimport-freshimport-lazyimurmurhashimport-fromhttp-signatureinflightinheritsiniimport-cwdimage-sizeinternal-slotinquirerimport-localipinvariantinterpretindent-stringis-accessor-descriptoris-callableis-arrayiship-regexis-core-moduleis-date-objectis-bufferis-ciis-directoryexpectis-extglobis-data-descriptoris-dockeris-descriptoris-extendableis-globis-finiteis-fullwidth-code-pointis-git-dirtyis-generator-fnis-installed-globallyis-interactiveis-negative-zerois-git-repositoryis-objis-plain-objis-path-cwdis-numberis-npmis-regexis-path-insideis-plain-objectis-stringis-potential-custom-element-nameis-symbolis-text-pathis-regular-fileis-streamis-typedarrayis-utf8isexeisarrayis-wslis-yarn-globalis-windowsis-sshistanbul-lib-reportisstreamistanbul-lib-instrumentistanbul-lib-coverageisobjectisomorphic-fetchistanbul-lib-source-mapsjakeiterallistanbul-reportsjest-diffjest-changed-filesjest-docblockjest-clijest-eachjest-configjest-environment-nodejest-jasmine2jest-environment-jsdomjest-haste-mapjest-leak-detectorjest-get-typejest-matcher-utilsjest-mockjest-pnp-resolverjest-regex-utiljest-resolve-dependenciesjest-runnerjest-runtimejest-resolvejest-validatejest-utiljs-tokensjest-serializerjs-yamljest-workerjsbnjsescjetifierjest-watcherjson-parse-better-errorsjson-parse-even-better-errorsjson-schema-traversejsdomjson-bufferjson-stable-stringify-without-jsonifyjsc-androidjson5json-schemajsonfilejson-stable-stringifyjson-stringify-safekeyvjsonifykind-ofjsx-ast-utilsjsprimklawjsonparselatest-versionlevnlines-and-columnslocate-pathlodashlodash._reinterpolatelevenkleurlodash.templatelodash.templatesettingsload-json-filelodash.findlodash.throttlelodash.ismatchlog-symbolslodash.sortbyloud-rejectionlogkittyloose-envifylowercase-keyslru-cachemacos-releasemake-dirmap-objmap-cachemeowmap-visitmakeerrormerge2metrojest-message-utiljest-snapshotmetro-babel-registermetro-babel-transformermetro-configmetro-cachemetro-coremetro-resolvermetro-minify-uglifymetro-inspector-proxymetro-source-mapmetro-symbolicatemetro-react-native-babel-transformermime-dbmicromatchmime-typesmimic-responsemimeminimist-optionsminimatchmimic-fnmin-indentmkdirpmsminimistmixin-deepmodify-valuesnanmute-streamnegotiatornatural-comparenice-trynode-int64nanomatchnode-fetchnode-modules-regexpnode-releasesnode-notifiernormalize-package-dataneo-asyncnode-stream-zipnpm-run-pathnormalize-pathnullthrowsnormalize-urlnumber-is-nanobject-assignnwsapioauth-signobject-keysobject-inspectobject-copyob1object.assignmerge-streamobject.fromentriesobject.valuesobject-visitobject.entrieson-finishedonceon-headersmetro-react-native-babel-presetobject.pickoptionatoronetimeoptionsopenopencollective-postinstalloraos-tmpdirp-finallyp-locatep-limitos-namep-tryparent-modulep-cancelableparse-jsonp-mapp-each-seriespackage-jsonparse-node-versionparse-urlparse5parse-github-repo-urlparse-pathpath-existspath-is-absolutepascalcasepath-typeparseurlperformance-nowpath-keypath-parsepifypicomatchpinkie-promisepiratesplease-upgrade-nodepkg-dirpinkieplugin-errorplistprepend-httppretty-formatprocess-nextick-argsprettier-linter-helpersprogressprepend-fileposix-character-classesprelude-lsprop-typespromptsprotocolspromisepumppseudomapqpunycodeqspupapslquick-lrureact-isrange-parserread-pkg-upread-pkgreadable-streamredentrcreact-refreshrechoirreact-devtools-coreregenerateregexp.prototype.flagsregenerate-unicode-propertiesregenerator-runtimeregexppregenerator-transformregistry-auth-tokenregexpu-coreregex-notregistry-urlregjsgenregjsparserremove-trailing-separatorrepeatingrepeat-elementrepeat-stringrequestrequest-promise-nativeresolverequire-directoryrequest-promise-coreresolve-fromresponselikeresolve-pkgrequire-main-filenameresolve-alpnresolve-cwdrestore-cursorresolve-urlrimrafretryresolve-globalretrsvpreusifyrun-asyncrx-litesafe-buffersafe-regexrx-lite-aggregatesrun-parallelsafer-buffersanerxjssemversemver-comparesaxschedulersaxessemver-diffsendserialize-errorsemver-regexserve-staticset-valuesetprototypeofset-blockingshebang-regexshebang-commandshellwordsside-channelsignal-exitsetimmediateshelljsshell-quotesimple-plistsisteransislashsnapdragonsnapdragon-utilslideslice-ansisnapdragon-nodespdx-correctsource-map-supportspdx-exceptionsspdx-expression-parsespdx-license-idssource-mapsplit-stringsource-map-urlsource-map-resolvesplit2splitsprintf-jsstack-utilssshpkstatic-extendstacktrace-parserstatusesstealthy-requirestring-widthstring.prototype.matchallstring.prototype.trimendstream-buffersstrip-ansistrip-bomstring.prototype.trimstartstring_decoderstrip-indentstrip-json-commentsstring-lengthsupports-colorstrip-eofstrip-final-newlinesudo-promptsymbol-observablesymbol-treetempsupports-hyperlinkstableterm-sizetext-tableterminal-linktext-extensionstest-excludethroughthrough2to-fast-propertiestime-stampto-object-pathto-regextmpto-readable-streamtmpltrim-newlinestrim-off-newlinestslibtr46to-regex-rangetough-cookietunnel-agenttoidentifiertweetnacltsutilstype-festtype-detecttypedarraytypedarray-to-bufferuglify-estype-checkuglify-jsua-parser-jsultronunicode-canonical-property-names-ecmascriptunicode-match-property-ecmascriptunicode-match-property-value-ecmascriptunicode-property-aliases-ecmascriptunique-stringunion-valueuniversal-user-agentuniversalifythroaturi-jsunpipeupdate-notifierunset-valueurl-parse-laxuse-subscriptionutil-deprecateurixurl-joinvalidate-npm-package-licensev8-to-istanbuluseutils-mergeuuidvalidate-npm-package-namevaryverrorvlqwalkerv8-compile-cachewcwidthw3c-xmlserializerw3c-hr-timewhatwg-encodingwebidl-conversionswhichwhatwg-fetchwhatwg-urlwhatwg-mimetypeword-wrapwidest-linewhich-pm-runswindows-releasewindow-sizewrappywrap-ansiwordwrapwswrite-file-atomicwritexcodexdg-basedirxml-name-validatorxmlbuilderxmldomxtendxmldocwhich-modulexpipexmlcharsy18nyargs-parseryallistyamlyargs
0.2.4

3 years ago

0.2.3

3 years ago

0.2.0

4 years ago