-
Notifications
You must be signed in to change notification settings - Fork 1
Retrieving Phone Contacts
levching edited this page Apr 15, 2020
·
3 revisions
The code snippet below shows you how to load all user phonebook contacts. Use the AN_ContactsContract as an entry point. Loaded contact entries will be represented as AN_ContactInfo class instance.
using SA.Android.Contacts;
...
AN_ContactsContract.Retrieve((result) => {
if(result.IsFailed) {
Debug.Log("Filed: " + result.Error.Message);
return;
}
Debug.Log("Loaded: " + result.Contacts.Count + " Contacts.");
foreach(var contact in result.Contacts) {
Debug.Log("contact.Id: " + contact.Id);
Debug.Log("contact.Name: " + contact.Name);
Debug.Log("contact.Note: " + contact.Note);
Debug.Log("contact.Organization: " + contact.Organization);
Debug.Log("contact.Phone: " + contact.Phone);
Debug.Log("contact.Photo: " + contact.Photo);
}
});Reliable and high-quality Unity Development service. Let's Talk!
Website | AssetStore | LinkedIn | Youtube | Scripting Reference
- Build Info
- Dark Mode
- Package Info
- Runtime Permissions
- Run External App
- Immersive Mode
- PackageManager
- Popups & Preloaders
- Rate Us Dialog
- Activity
- Intent
- Settings Page
- Media Player
- Date Picker Dialog
- Time Picker Dialog
- Locale
- Wheel Picker Dialog
- Developer Console Setup
- Connecting to The Service
- Purchase Flow
- Transactions Validation
- Subscriptions
- Licensing
- Getting Started
- Games Sing-in
- Server-side API Access
- Leaderboards
- Achievements
- Saved Games
- Image Manager
- Settings Intent