Android : How to get formatted number from Contacts in Android

on Tuesday, September 23, 2014



  1. I store an entry in Contacts with plain (no spaces, dashes) number +12223334444.

  2. Android displays it in Contacts Details as formatted (spaces and dashes added) +1 222-333-4444 (this is NANP-style number) and I suppose that Android uses libphonenumber for this.

  3. In my app I need to display this number formatted +1 222-333-4444' but what I get form Contacts query is plain number+12223334444`


So I need to use again libphonenumber or can I take it already formatted from Contacts?


0 comments:

Post a Comment