In JNI method I use call to Java objects to get locale settings.
My JNI call is similar to Locale.getDefault() that I used to get it.
Will application be notified about system locale changes?
So, typical usecase:
Will I get actual information about current locale in step 4?
An Intent is broadcast for this the ACTION_LOCALE_CHANGED
should let you know when a change in the preferences has happened. However if you're calling it after its changed without having been notified, you'll still get the new locale information.
http://developer.android.com/reference/android/content/Intent.html#ACTION_LOCALE_CHANGED
Will I get actual information about current locale in step 4?
Yes, I will.
But there is one issue:
If main activity blocked by native call , locale information will not change till the main activity not recive ACTION_LOCALE_CHANGED.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.