Open amitkot opened 4 years ago
The grep command when using he-IL:
/usr/local/share/android-sdk/platform-tools/adb -s emulator-5554 logcat -b main *:S
ContactsDatabaseHelper:I ContactsProvider:I -e he_IL
Output without requiring the he-IL
shows the service outputs iw_IL
instead:
$ /usr/local/share/android-sdk/platform-tools/adb -s emulator-5554 logcat -b main *:S ContactsDatabaseHelper:I ContactsProvider:I
02-02 12:16:29.625 6445 6445 I ContactsDatabaseHelper: updateUseStrictPhoneNumberComparison: US
02-02 12:16:30.794 6445 6639 I ContactsProvider: Locale has changed from [en_US] to [iw_IL]
02-02 12:16:30.888 6445 6639 I ContactsDatabaseHelper: Switching to locale [iw_IL] (ICU v63.2.0.0)
02-02 12:16:31.002 6445 6639 I ContactsDatabaseHelper: Locale change completed in 113ms
02-02 12:16:31.005 6445 6639 I ContactsDatabaseHelper: Switching to locale [iw_IL] (ICU v63.2.0.0)
02-02 12:16:31.281 6445 6639 I ContactsDatabaseHelper: Locale change completed in 275ms
02-02 12:17:26.138 8703 8703 I ContactsDatabaseHelper: updateUseStrictPhoneNumberComparison: US
02-02 12:18:35.962 9516 9516 I ContactsDatabaseHelper: updateUseStrictPhoneNumberComparison: US
Seems that Android emulator now supports setting the locale when starting it:
emulator -avd <avd-name> -change-locale fr-CA
Source - https://androidstudio.googleblog.com/2019/09/emulator-29112-stable.html
You might be using an older emulator? Thanks for the tip!
My app is localised for multiple locales, one of which uses Hebrew language. When running screenshots with an Android emulator, the mechanism for switching locales is currently not working properly for Hebrew.
After the locale is changed to
he-IL
, the process gets stuck and never advances.I used
he-IL
and runningscreenshots -v
I noticed that theadb log
command is waiting for an input that never arrives.It seems there is an old standard for locales with Hebrew that used
iw
instead ofhe
, and although the locale is nowhe-IL
everywhere, the tools whose logs are being grepped doesn't outputhe
. When running with the localeiw-IL
, the screenshots tool worked fine for Android, but the screenshots were iniw-IL
folder and iOS did not work properly.