Get Current Dial Code & Count Flag By Using Country ISO

🌍 Overview

RYDialCode is a fully offline country utility extension that allows your app to:
●Detect the device’s Country ISO code

●Get the international dialing code for that country

●Generate the country flag emoji

●Support 240+ countries worldwide

●Work without internet

🔧 Available Blocks

:one: GetCountryISO : Return Current Country ISO

29d397af-1fc5-4ec8-9391-0b546b20e2f4

:two:GetDialCodeByISO : Returns the international dialing code for a given ISO country code

:three: GetFlagEmojiByISO :
Generates the Unicode flag emoji from a 2-letter ISO country code

:four: GetAllISOCountries :
Returns all ISO country codes supported by Android

Extension :
RYDialCode.aix (12.1 KB)

Demo Blocks


✅ Key Features

:heavy_check_mark: Fully Offline

:heavy_check_mark: Fast & Lightweight

:heavy_check_mark: SIM / Network based country detection

:heavy_check_mark: Locale fallback support

:heavy_check_mark: Unicode Flag Emoji support

:heavy_check_mark: 240+ ISO countries

:heavy_check_mark: Automatically shows correct flag and dial code

:heavy_check_mark: Works worldwide

:heavy_check_mark: No internet required

🔐 Permissions

❌ No extra permissions required (TelephonyManager is used safely with fallback handling)

⚠️ Important Notes

🔸 Shared Dial Codes
Some countries share the same dial code: USA, Canada, Jamaica → +1 This is normal and correct behavior.
🔸 Dual SIM / Manual Region
If the device region is manually changed, the ISO code may reflect that region.
🔸 No SIM Scenario
If no SIM is available: System locale is used Safe fallback mechanism

More or less already previously done here:

1 Like