This example show you how to format phone numbers with a patter
You will need the following library in your gradle.
compile 'com.googlecode.libphonenumber:libphonenumber:7.2.2'