c# - Uwp get holders phone number as ContactInformation -


we have windows.applicationmodel.contacts.contactpicker pick contact our contact list.

var contactpicker = new contactpicker(); contactpicker.desiredfieldswithcontactfieldtype.add(contactfieldtype.phonenumber); contact contact = await contactpicker.pickcontactasync(); if (contact?.phones[0] contactphone) {     foreach (contactphone phone in contact.phones)     {         var result = phone.number;         // ...     } } else {     // ... } 

but posible holders mobile phone? need retrieve phone number of current phone holder.

yes, possible. can use smsdevice2.accountphonenumber phone number. article,pay attention of

this functionality available mobile operator apps , windows store apps given privileged access mobile network operators, mobile broadband adapter ihv, or oem.

hence requires cellularmessaging capability, special-use capability, declared in package manifest, kind of app can’t published in windows store normal developer

a relative sample of sms can reference sms send , receive sample.


Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -