0
之間有什麼區別:獲得國家TelephonyManager VS locale.getCountry()
String locale = context.getResources().getConfiguration().locale.getCountry();
和
TelephonyManager tm = (TelephonyManager)this.getSystemService(this.TELEPHONY_SERVICE);
String countryCodeValue = tm.getNetworkCountryIso();
我需要的是這樣的(很難對它進行測試)。用戶來自美國,用他的SIM卡前往法國並在國外使用他的SIM卡,該設備始終以英語(美國)。當他到達法國時,我需要從代碼中獲得法國。如何做到這一點?
請再讀一遍我的問題 – Dim