0

My Vulkan-based game is based on NativeActivity and needs to avoid ALL activity destroy/recreate configuration changes because of the massive amount of load time it takes to do that. I currently have this defined for the activity in AndroidManifest.xml.

android:configChanges="colorMode|density|fontScale|fontWeightAdjustment|grammaticalGender|keyboard|keyboardHidden|layoutDirection|locale|orientation|screenLayout|screenSize|smallestScreenSize|uiMode">

But when the user changes system language my activity is destroyed and re-created. Is there some other (undocumented?) config change I need to declare? How do I prevent activity destruction/recreation for system language changes?

1 Answer 1

0

That would be locale. I also wouldn't worry about it- nobody ever changes locale. Even if they're bilingual, they don't change the locale of the phone to swap languages- they just change the keyboard language. You're talking about a scenario that only a QA person would ever find.

Sign up to request clarification or add additional context in comments.

3 Comments

I agree that users usually not change system locale, but since Android 13 there is the possibility to set app-specific locales, thus changing may happen if the app give the users a reason to change (may be a certain translation is so bad that users try a different language).
Still not a common enough occurence to actually worry about. And if they do change it, they'll do so once. And the perf hit when it happens will be ignorable.
Thanks. I even tried adding an override fun onConfigurationChanged() method but I never get a notification for locale, nor any of the other listed configuration change events.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.