Skip to content

Read Selected Country Properties

Harsh Bhakta edited this page Oct 28, 2017 · 3 revisions

##- Country's 3 properties (Country name, phone code and name code) can be read individually.

Read selected country phone code

  • To get selected country code as String type and without prefix “+”, use getSelectedCountryCode(); method. => “91”
  • To get selected country code as String type and with prefix “+”, use getSelectedCountryCodeWithPlus(); method. => “+91”
  • To get selected country code as int (Integer) type, use getSelectedCountryCodeAsInt(); method. => 91

Read selected country name

  • To get selected country’s name in selected language, use getSelectedCountryName(); => “India” (for english), "भारत" (for hindi)......
  • To get selected country's English name, use getSelectedCountryEnglishName(); => "India" (English name, irrespective of selected language)

Read selected country name code

  • To get selected country’s name code, use getSelectedCountryNameCode(); => “IN”
Clone this wiki locally