android - 获取 Android MSISDN 值

标签 android

我有一个问题。有人可以指导我如何获得我的移动 MSISDN 号码。是否有任何用于获取/显示 MSISDN 号码的示例应用程序。我需要获得 MSISDN 号码。任何示例项目都会有很大帮助。

提前致谢。

最佳答案

它已在一些主题中涵盖,即:Programmatically obtain the phone number of the Android phone .

但是,请记住,这并不总是有效。至少有几张葡萄牙 SIM 卡,我无法使用这些方法检索电话号码。

引用@Johan 在该主题中的回答:

There is no guaranteed solution to this problem because the phone number is not physically stored on all SIM-cards, or broadcasted from the network to the phone. This is especially true in some countries which requires physical address verification, with number assignment only happening afterwards. Phone number assignment happens on the network - and can be changed without changing the SIM card or device (e.g. this is how porting is supported).

I know it is pain, but most likely the best solution is just to ask the user to enter his/her phone number once and store it.

关于android - 获取 Android MSISDN 值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9498192/

相关文章:

android - 传递图像 URL 时无法在 android 中的 onActivityResult() 中获取数据

android - 实现 Parcelable 时使用 Float 而不是 float(Primitive 类型)

java - 类型必须实现继承的抽象方法 TextToSpeech.OnInitListener.onInit(int)

android - 配置更改后 Fragment.getArguments() 是否返回传递的参数?

android - 共享对象、符号、C/C++ lib 链接和加载

android - 在 Android 上使用 AT 命令与调制解调器通话

java - 使用多个微调器过滤 ListView ?

android - 动态更改 ActionBar 中的图标

android - 如何通过 View ID 获取 FragmentManager?

android - Roboguice 和模拟 : How to have roboguice inject a mock service when testing but use the REAL otherwise?