@arturober/capacitor-contacts
v0.0.10
Published
A plugin for getting your contacts from the phone
Downloads
35
Readme
Capacitor Contacts plugin
This plugin retrieves all your phone contacts: name and phones (Only works in Android)
Installation
npm install @arturober/capacitor-contacts@latest
Necessary permissions
<uses-permission android:name="android.permission.READ_CONTACTS" />
Usage
import { Plugins } from '@capacitor/core';
const { ContactsPlugin } = Plugins;
@Component({
selector: 'app-contacts',
templateUrl: './contacts.page.html',
styleUrls: ['./contacts.page.scss']
})
export class ContactsPage implements OnInit {
constructor() {}
async ngOnInit() {
const result = await ContactsPlugin.getContacts();
console.log(result);
}
}