I know that there are a few question already answered on this topic but i have a more specific problem. I have tried to implement Android - change device system locale programmatically , with no success (simply it doesn't change the language, don't know if it's my implementation that faults...).
Searching i've found Change Device language via ADB, that is:
os.writeBytes("setprop persist.sys.language en; setprop persist.sys.country en; stop; sleep 5; start" + "\n");
and the same with
os.writeBytes("setprop persist.sys.language it; setprop persist.sys.country it; setprop ctl.restart zygote" + "\n")
that's work pretty well, apart from the fact that it does restart the phone (it doesn't reboot it, but it's a kind of restart).
I know that the "problem" is with the stop; sleep; start
part, but keep them out return a change but not effective: system locale has been changed, but the effect will be shown only after phone reboot (i.e.: after reboot, language is changed).
It is really annoying to force the restart of the phone just because of changing the language; i know for sure that it is possible to make the changes effective (the default settings app does it), and i think (i'm not sure) that after making the language change a kind of intent is fired and all the apps check for the new language to show...
Does someone know how i could reach such a result?
I have a rooted phone so i have no problem with the permission stuff :)
thanks in advance!