Hello everyone, I'm creating an application that when I log in, the application brings the data Nome
, Login
, Senha
and Foto(a url)
of the server database, and save those data in a Singleton
so that they are used in all other activitys
. So far so good, everything works fine, but when I have buttoned the person to choose a photo from the gallery and upload it (all this is working), I realized that if I take a little time to choose the photo and wait in the gallery, the data that I recorded in Singleton
'get lost' (as if they were deleted or I do not know). I would like to know if you have a way to save this data without 'getting lost' when I leave my application in background
. Note: I did not post any code because I believe it is not necessary, since it does not make any errors in it, but the data that 'disappear', I believe the android is somehow erasing them to release memory or something. But if you need to, just ask me to edit the question and put the code.