I have forked firebaseUI-auth library and they are using google smartlock. the issue i am facing is that i change the locale of the application at runtime. i ask the user what locale they want and then i change the locale and the issue is google smart lock prompts do not change. they keep the devices locale. here is how i am changing the locale of each activity:
public class Util {
private static Locale sLocale;
@NonNull
public static void setLocale(Locale locale) {
sLocale = locale;
if(sLocale != null) {
Locale.setDefault(sLocale);
}
}
public static void updateConfig(@NonNull ContextThemeWrapper wrapper) {
if(sLocale != null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
Configuration configuration = new Configuration();
configuration.setLocale(sLocale);
wrapper.applyOverrideConfiguration(configuration);
}
}
and then when the activity is ready to change the locale it does this is its constructor:
public MyActivity() {
Util.updateConfig(this);
}
and it works fine but not for google smart lock which really is not apart of my application. How can i insert another locale for google smart lock prompts to use ?
The Smart Lock dialogs are system prompts and use the system locale by design; they are a separate process and not intended to be part of the application UI.