确保 Android 应用程序提供的电话号码采用国际格式?
我的应用程序的用户将向我提供他们将要编写的短信的收件人的电话号码。当用户在向位于自己国家/地区的人发送消息时提供国家格式时,如何确保使用国际电话号码格式? 我是否必须真正了解我拥有用户的每个国家/地区使用的电话号码的所有国家语法?如果是这种情况(我希望不是),有人知道语法列表吗?如果不是,还有什么替代方案?也许是 Android 之外的解决方案? :)
提前致谢!
最好的问候
S。
the users of my app will provide me the recipient's phone numbers of the text messages they will be writing. How can I ensure the usage of the international phone number format when the user provides a NATIONAL format while sending a message to a person who is located in his own country?
Would I have to actually KNOW all the national syntaxes for phone numbers that are used in every single country I have users in? If that is the case (what I SO wish that it is not), does anyone know a list of the syntaxes? And if not, what is the alternative? An out-of-Android-solution maybe? :)
Thanks in advance!
Best regards
S.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我所知,电话号码的国际格式是+--。['-'仅用于分隔和表示。 ]
当用户输入此格式时,所有电信运营商都将能够解析并将其重定向到正确的网络(即使另一部手机位于同一国家或地区)
因此,如果您遵循此格式应该是够了。
以下是 Wiki 的链接供您参考。
问候,
维奈
As I know the international format of telephone number is +--.['-' used for separation and representation only. ]
When a user put this format all the telecom operators will be able to parse and redirect them to the correct network (Even in case of when the other phone is with in the same country or region)
So, if you follow this format should be suffice.
Here is a link to Wiki for your reference.
regards,
Vinay