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

ios - Memory not freeing up after popping viewcontroller using ARC -

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -