【发布时间】:2018-01-15 07:37:14
【问题描述】:
我的应用中有一个广播接收器,当设备的区域设置更改时会调用它。我的应用程序在一些设备上存在错误,特别是 Nexus 5x 和 Galaxy S8+(很可能还有其他设备),其中 Locale.getDefault() 返回过时/以前的值。新语言的本地化字符串正确显示,但在应用程序内部,我们的语言环境已过时。有什么想法吗?
例如:
1) Device is in English -> App locale tells us we are in English.
2) Background the app and change the device language to German
3) App receives the locale changed broadcast event, Locale.getDefault() returns English instead of German
我看到许多设备在此处返回德语,但不是所有设备。
【问题讨论】: