I'm creating a tracking app and i want to get location from GPS and then keep coordinates in string (Because I must use this later).
Step-by-step how app looks
1) I push button "get location"
2) I'm connecting with gps and (after some time) i get locations and display them in editText
3) After change string from null to coordinates i want to save it and keep it by using shared preferences because i need them later (even after re open app)
What should I do to save that string in proper moment (when it's changed from null to coordinates)