开发者

android number format for germany

is there a public algorithm that formats German phone numbers (mobile and landlines)? I saw there is a method t开发者_Python百科o format phone numbers PhoneNumberUtils.getFormatTypeForLocale(Locale locale) but this is only for NANP countries, see here.


Maybe libphonenumber can do what you want?


Like most android documentation PhoneNumberUtils very poorly created. Try Locale.GERMANY as method input. If the locale format is unavaible like you mentioned, you have to write your own method. Maybe extending PhoneNumberUtils and overriding that method is a good practice. Good luck anyway :).

Edit: aspartame's answer seems more logical to me.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜