Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

158
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!