Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

152
Visualizações
Which way of saving user data should I use for my Android app?

I'm trying to save the state of the app so that when the user reopens it, it looks just as it did when it was closed.

(I think) I've found at least five ways of doing this:

  • SharedPreferences
  • onSaveInstanceState
  • OnPause
  • CoreData
  • ORM

I'm a bit lost as to which one of these is the correct solution for a given scenario. My app contains several settings, such as whether certain UI elements should be shown or hidden. But it also contains hundreds of objects that reference each other in unique ways based on user behavior. Which way of saving this data should I be using to preserve all of this?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

If you're using Google's MVVM you can try to use SavedState for ViewModel This way your app state can survive death of the app process. But the state must be lightweight. If you have quite a lot of data on your screen you should also use Room or file cache or something else. You can read about saving states here

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda