cordova-plugin-export-contacts-vcf-external-storage

1.1.0 • Public • Published

cordova-plugin-export-contacts-vcf-external-storage

By Neeraj Tuteja

Updated by Vasiliy Mikhaylovsky

Modifed By Juthawong Naisanguansee - To Write External Storage

Description

Export all contacts (device, Google, Facebook etc) to a file and use its path for further processing

Installation

This requires cordova 5.0+ ( current stable v1.0.0 )

cordova-plugin-export-contacts-vcf-external-storage

It is also possible to install via repo url directly ( unstable )

cordova plugin add https://github.com/juthawong/cordova-plugin-export-contacts-vcf.git

Supported Platforms

  • Android

Usage

  1. Wait for deviceReady.
  2. Call plugins.exportContactsVCF with parameters

API

plugins.exportContactsVCF(onSuccess, onFail, fileName, fileExtension) default fileName is 'exportedContactsInVCF', fileExtension is 'vcf'

Note

From What I modified and update plugin. This Plugin isn't automatically prompt user permission in Android 6.0+ yet. Please use cordova-plugin-android-permissions and request these 2 permission

permission.READ_CONTACTS

permission.WRITE_EXTERNAL_STORAGE

plugins.exportContactsVCF(function(pathToVcfFile) {
    console.log('vcf stored at: ' + pathToVcfFile)
}, function(err) {
  console.error('Error: ' + err)
}, 'my-contacts')

Package Sidebar

Install

npm i cordova-plugin-export-contacts-vcf-external-storage

Weekly Downloads

1

Version

1.1.0

License

MIT

Unpacked Size

11 kB

Total Files

6

Last publish

Collaborators

  • juthawong