Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

Awesome Lists containing this project

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 Android



Easy 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 ...
```