Está faltando você fazer o commit/apply...
editor.apply();
On Mon, Aug 29, 2016 at 9:09 AM, Pablo Borges <pablosborges@gmail.com> wrote:
pessoal,--eu tenho um app que salva alguns dados no sharedpreferences.SharedPreferences sharedPref = getActivity().getSharedPreferences( getString(R.string.pref_file_sessao_key), Context.MODE_PRIVATE); SharedPreferences.Editor editor = sharedPref.edit();editor.putBoolean(getString(R.string.pref_sessao_logado), true); acontece que em alguns tablets após atualização do aplicativo. estes valores se perdem.existe outra maneira de resolver isto?obrigado
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com .
For more options, visit https://groups.google.com/d/optout .
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
0 comentários:
Postar um comentário