Questions tagged as 'sharedpreferences'

2
answers

Save SharedPreferences by assigning a key using getDefaultSharedPreferences ()

I have a class to save the email and user that connect in the application with sharedpreferences , but I save the data without any key reference so when I want to save a different data without overwriting the previous one I do not i...
asked by 27.04.2016 / 00:32
2
answers

problems with SharedPreferences the application stopped!

My class: conf.java public class conf extends AppCompatActivity { EditText idplacatxt; Button guardar_btn; TextView idplacalbl; private configuracion conf; @Override protected void onCreate(Bundle savedInstanceState)...
asked by 03.10.2017 / 16:04
1
answer

Load different texts in the same TextView (SharedPreferences)

I have two EditText and what I write I keep it in SharedPreferences and I charge it in TextView but I can only load the text of a EditText and not both texts. What I want is to load the two texts in the same TextVi...
asked by 19.05.2017 / 22:58
2
answers

Data persistence on Android

Goodbye, I'm creating an app where in the first activity I filter the regions of the country and then I pass them through the following activity where I call a webservice with the respective filter to bring me the correct data, after that clicki...
asked by 15.07.2016 / 17:04
3
answers

Save a value on Android

I want to take the value I have in TextView , add it, save it and repeat this process every time the button is touched, but I do not understand why I can not save it. My code: public class MainActivity extends Activity { Button b...
asked by 09.06.2016 / 18:14
1
answer

I want to save and recover the selected value in a Spinner in SharedPreferences

I can bring the values to other components but not to the Spinner , this is my code: //Función que crea un archivo de preferencias public void CargarPreferencia() { SharedPreferences mispreferencias=getSharedPreferences("PrefeM", Context....
asked by 26.11.2017 / 13:39
1
answer

Error when playing shared sound with shared preferences

with an intent I select an mp3 file and I save with URI the location in shared preferences as I found in Google; in another activity a media player element is launched that rescues the uri. But ... I give play to play it and it works I clo...
asked by 24.11.2018 / 19:14
1
answer

help shared preferences

I want to save a location with shared preferences as I can not save objects I only save the latitude and longitude, I transform it into string I save them and then I take them out and transform them into double back to load them to th...
asked by 04.07.2018 / 00:57
1
answer

How do I save the status of an activity with sharedpreferences?

I want to know how I do to save the status of my activities, for example if I go in level 2, I mean in activity 2, as I do to save the textview that indicates the level, for example level2, and that when closing the app and open it again, when y...
asked by 25.05.2018 / 00:13
2
answers

Android Does Sharedpreferences save null?

Good morning everyone! I'm making an app using Android Studio. It is very simple, it has a numeric field to enter a número de cliente and a button of confirmar that based on the number entered brings you the puntos of that c...
asked by 25.01.2018 / 00:45