setFullNumber

fun setFullNumber(raw: String, allowCountryChange: Boolean = true)(source)

Parses a full or partial number, adopting the country it identifies when allowCountryChange.

A pasted +4915123456789 should switch the field to Germany; a pasted 0712345678 carries no country information and must not. PhoneNumberFormatter.parseInternational reports which case it was, and only the former changes the country.