Provides the device region as reported by independent sources. The sources can disagree (e.g. while roaming, or when the user picks a locale from another country), so choose the one that fits your use case instead of assuming they match.
Example:
let region = await Eitri.device.getRegion()
console.log(region)
// Example output from this console.log on Android:
{
"sim": "BR",
"network": "BR",
"locale": "BR",
"timezone": "America/Sao_Paulo"
}
sim and network are always null on iOS. Check
DeviceRegionOutput for details on each source.
- API LEVEL
39- Functionality added
Generated using TypeDoc
Provides device informations.
Example: