I have developed an android app ( using Kotlin and Android Studio ) to learn second language with English as base language. One of the screens in my app English text is displayed on upper half and its translated meaning in another language on the lower portion of screen.
Resources are as below
res/values/string.xml -----> English by default
res/values-hi/string.xml -----> second language
It works perfectly on Samsung devices. Tested on real Samsung devices and 10 different Pixel emulators (mixture of tablets and phones). All good till now.
I published this app on Google Play using app bundle. Found that it works only on few devices. On few devices second language is not displayed. Instead English is displayed on both parts of the screen. Clearly language resource is not pushed by PlayStore.
By google search found that console makes different versions on APK's and multiple language resources are made available to download based on users device language. I am assuming that for devices that my app doesn't work on, Google Play is only making available the APK with English configuration which does not have strings.xml from values-hi folder.
But in my case my app needs both language resources to be loaded on users's device regardless of users region/location or device settings.
What do I do?
I have found that the below lines in app's gradle file will fix the issue and tell google console to include all language resources in all APK's.
android {
bundle {
language {
enableSplit = false
}
}
}
Is my understanding correct? Wanted to ask here before I publish to console again.
Also NOTE that this happens only when downloaded from Google play Store. If I install my APK file directly on devices it all works fine on all devices. Exactly same code base when bundled into .aab and uploaded to Console and then download it via PlayStore, it stops working.
Again it works on some Samsung devices when downloaded from PlayStore. This confuses me more.
I think I do not have full understanding of what Google Console does to my bundle once submitted for review.
Is there any way by which I can tell console not to do any modifications to my bundle?
By the way this is my first android development effort !!
Please kindly help me. Thank you.
EDIT: On further looking around found this Android App Bundle with in-app locale change
Will uploading APK (instead of bundle) solve it 100%. I am not worried of download size as resources files are not big. File is just 40KB.