有没有办法使用c#获取windows phone 10的手机号码 [英] Is there any way to fetch Mobile Number of windows phone 10 using c#

查看:31
本文介绍了有没有办法使用c#获取windows phone 10的手机号码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在 UWP 中创建了我的应用程序.我需要搜索当前的 sim 和 sim 手机号码.请帮我在 c# 中使用 windows phone 10 查找手机号码

I have created my application in UWP. I need to search current sim and sim Mobile number. Please help me for find the mobile number using windows phone 10 in c#

推荐答案

是的,这是可能的.您可以使用 SmsDevice2.AccountPhoneNumber得到电话号码.从这篇文章,关注

Yes, it is possible. You can use SmsDevice2.AccountPhoneNumber to get the phone number. From this article,Pay attention of

此功能仅适用于移动运营商应用和通过移动网络获得特权访问的 Windows 应用商店应用程序运营商、移动宽带适配器 IHV 或 OEM.

This functionality is only available to mobile operator apps and Windows Store apps given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM.

因此它需要在包清单中声明 cellMessaging 功能,这是一种特殊用途的功能,因此此类应用无法在 Windows 应用商店中为普通开发人员发布

Hence it requires the cellularMessaging capability, a special-use capability, to be declared in the package manifest, so this kind of app can’t be published in Windows Store for normal developer

您可以参考的短信相关示例短信发送和接收样本.

A relative sample of SMS you can reference SMS send and receive sample.

这篇关于有没有办法使用c#获取windows phone 10的手机号码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆