【发布时间】:2019-12-05 10:27:58
【问题描述】:
在通常情况下,如果用户的设备是物理 SIM 卡,我将通过以下代码获取国家/地区文化代码:
TelephonyManager manager = (TelephonyManager) cxt.getSystemService(Context.TELEPHONY_SERVICE);
//getNetworkCountryIso
if (manager != null && manager.getSimCountryIso() != null) {
return manager.getSimCountryIso().toLowerCase();
}
但是当设备中有 2 个模拟人生时,上面的代码会发生什么?以及当设备持有 e-sim 而不是物理 sim 时,我将如何获得国家 ISO 代码。
【问题讨论】:
标签: android telephony country-codes