How to format a phone number using PhoneNumberUtils?

前端 未结 8 1883
慢半拍i
慢半拍i 2020-12-07 22:05

How can I format a phone number using PhoneNumberUtils?

E.g.: 1234567890(123) 456-7890

8条回答
  •  醉梦人生
    2020-12-07 22:54

    2020- November

    Following worked for me for all version of OS:

    PhoneNumberUtils.formatNumber(yourStringPhone,Locale.getDefault().getCountry());
    

提交回复
热议问题