0

I am trying to format a phone number but problem is i am getting - instead of ()

Please let me know how i can fix this.

I am trying this code to format i am receiving num like this +1111111111:

try
{
    formattedNumber = PhoneNumberUtils.formatNumber(model.getReceiverMobileNumber(), SharedPref.getString(context,SharedPref.country_code));
}
catch(Exception e)
{
}

My output:

+1 111-111-1111

but i want

+1 (111) 111-1111

thanks

AskNilesh
  • 67,701
  • 16
  • 123
  • 163
Amit Sharma
  • 926
  • 2
  • 10
  • 35

0 Answers0