Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/enisn/Xamarin.Forms.Contacts
Read Contacts Data on iOS and Android
https://github.com/enisn/Xamarin.Forms.Contacts
Last synced: 30 days ago
JSON representation
Read Contacts Data on iOS and Android
- Host: GitHub
- URL: https://github.com/enisn/Xamarin.Forms.Contacts
- Owner: enisn
- License: mit
- Archived: true
- Created: 2018-03-03T11:04:20.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2021-04-07T21:15:53.000Z (over 3 years ago)
- Last Synced: 2024-11-06T01:43:33.190Z (about 1 month ago)
- Language: C#
- Size: 3.22 MB
- Stars: 57
- Watchers: 9
- Forks: 17
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-xamarin-forms - Xamarin.Forms.Contacts ★58
README
# Obsolete
This library is obsolete and doesn't target newer versions of Android & iOS.I strongly recommend to use [Xamarin.Essentials](https://github.com/xamarin/Essentials) to read contacts.
---
# Xamarin.Forms.Contacts
Read Contacts Data on iOS and AndroidEasy usage in Portable Project:
```csharp
var contacts = await Plugin.ContactService.CrossContactService.Current.GetContactListAsync();
```You can generate ObservableCollection like that:
```csharp
var contacts = await Plugin.ContactService.CrossContactService.Current.GetContactListAsync();ObservableCollection = new ObservableCollection(contacts);
```
You can use filter like that:
```csharp
var contacts = await Plugin.ContactService.CrossContactService.Current.GetContactListAsync(x=>x.Emails.Count > 0);
```DO NOT FORGET ADD THIS PERMISSIONS:
# ANDROID
```
READ_CONTACTS
```# iOS
If you don't have mac connection you should Right Click the **Info.plist** and Open With XML editor.
Add this key into ****
```xml
NSContactsUsageDescription
We need contact permission to do ...
```