Skip to content

vladyslavsosiuk/Xamarin.Forms.Contacts

 
 

Repository files navigation

Xamarin.Forms.Contacts

Read Contacts Data on iOS and Android

Easy usage in Portable Project:

var contacts = await Plugin.ContactService.CrossContactService.Current.GetContactListAsync();

You can generate ObservableCollection like that:

var contacts = await Plugin.ContactService.CrossContactService.Current.GetContactListAsync();

ObservableCollection<Contact> = new ObservableCollection<Contact>(contacts);

You can use filter like that:

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

	<key>NSContactsUsageDescription</key>
	<string>We need contact permission to do ...</string>

About

Read Contacts Data on iOS and Android

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 99.9%
  • Batchfile 0.1%