Language can be changed in
Home > Menu > Settings > Locale & text > Select locale
I am wondering how can I detect such change? My application is seems to be turned off by system during such operation, however I have to be 100% sure, that this is official rule.
Do you know something about this?
An Intent is broadcast for this:
http://developer.android.com/reference/android/content/Intent.html#ACTION_LOCALE_CHANGED
You can register a BroadcastReceiver in your manifest to handle it.
http://developer.android.com/guide/topics/manifest/activity-element.html#config says:
android:configChanges Lists configuration changes that the activity will handle itself. When a configuration change occurs at runtime, the activity is shut down and restarted by default, but declaring a configuration with this attribute will prevent the activity from being restarted. Instead, the activity remains running and its onConfigurationChanged() method is called.
Note: Using this attribute should be avoided and used only as a last-resort. Please read Handling Runtime Changes for more information about how to properly handle a restart due to a configuration change.
Any or all of the following strings are valid values for this attribute. Multiple values are separated by '|' — for example, "locale|navigation|orientation".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With