The KnownContactProperties class is in under Windows.Phone.PhoneContract
namespace, but ContactManager.RequestStoreAsync() is under Windows.ApplicationModel.Contacts namespace. It may be the reason you cannot get the phone numbers. ContactStore.CreateOrOpenAsync method under Windows.Phone.PhoneContract
same with KnownContactProperties can work well. Here is a completed demo for inserting a contact and then get the contact's name and phone number.
XAML Code
<StackPanel>
<TextBox x:Name="txtName" Header="name" InputScope="NameOrPhoneNumber"/>
<TextBox x:Name="txtTel" Header="phone number 1" InputScope="ChineseHalfWidth"/>
<TextBox x:Name="txtTel1" Header="phone number 2" InputScope="TelephoneNumber"/>
<Button x:Name="btnSave" Content="Save" Click="btnSave_Click"/>
<Button x:Name="btnGet" Content="GET" Click="btnGet_Click"/>
</StackPanel>
Code behind
private async void btnSave_Click(object sender, RoutedEventArgs e)
{
var name = txtName.Text;
var tel = txtTel.Text;
ContactStore contactStore = await ContactStore.CreateOrOpenAsync(ContactStoreSystemAccessMode.ReadWrite, ContactStoreApplicationAccessMode.ReadOnly);
ContactInformation contactInformation = new ContactInformation();
contactInformation.DisplayName = name;
var contactProps = await contactInformation.GetPropertiesAsync();
contactProps.Add(KnownContactProperties.MobileTelephone, tel);
StoredContact storedContact = new StoredContact(contactStore, contactInformation);
await storedContact.SaveAsync();
}
private async void btnGet_Click(object sender, RoutedEventArgs e)
{
ContactStore contactStore = await ContactStore.CreateOrOpenAsync(ContactStoreSystemAccessMode.ReadWrite, ContactStoreApplicationAccessMode.ReadOnly);
var result = contactStore.CreateContactQuery();
var count = await result.GetContactCountAsync();
var list = await result.GetContactsAsync();
foreach (var item in list)
{
var properties = await item.GetPropertiesAsync();
System.Diagnostics.Debug.WriteLine(item.DisplayName);
System.Diagnostics.Debug.WriteLine(properties[KnownContactProperties.MobileTelephone].ToString());
}
}