My app has a language setting feature. Now it works perfectly, but after I restart the device, the language reverts to the original setting.
Does anyone have any ideas? Do i need to implement SharedPreferences?
I got the answer. If you have Language setting inside your app. and after restart device the last language you’ve changed still be default. One of the way to make this work, to store variable through SharedPreferences ; might be String language.
Another thing, you need to have is initiate class. so that, whenever you open app. it able to call.
For example
Setting appSettings = Setting.getInstance(getApplicationContext());
language = appSetting.getLanguage();
appSetting.setLanguage(language);
Yes, the best option is to use SharedPreferences.
You can find a tutorial here: http://www.sgoliver.net/blog/?p=1731
Hope this helps…