Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9008469
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:56:41+00:00 2026-06-16T01:56:41+00:00

i would like to ask a recommendation about data persistence on android.. the thing

  • 0

i would like to ask a recommendation about data persistence on android.. the thing is this: I have a small rest app that get a json data from a RESTful API that is de-serialized with jackson into an custom object and after that i use this object to feed my ui, the problem is that i want this data to be persistent or at least cache-able.

I saw there are some options that i could use: ORM-lite to save the object in a sqlite DB or save the JSON String into the shared Preference or a file in the internal memory, i already have read the article on the android developers site about this topic.

The structure of my object has at least 15 fields and it is related to an other object.

Which would be a good option?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T01:56:42+00:00Added an answer on June 16, 2026 at 1:56 am

    That really depends on a few other variables.

    Shared Preferences are great for iterable key/value pairs, but aren’t really designed for relational data. They’re also meant to store a finite amount of data, not an arbitrarily large dataset. For instance, you would save a user’s name in SharedPref, but probably not a complete history of every score the user achieved in every level, or the definition of every level.

    SQLite is much better at relational data, since it’s a relational database, but it might be overkill if you only ever want to hold on to one object at a time. Typically you’d need to set up a content provider, but I assume ORMLite would handle that for you.

    So: If you’re only storing one or two instances of this json object at any given time, probably shared pref just for convenience. If you’re storing arbitrarily large number of them, and the data it relates to, SQLite database.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to ask something about query using mysql I have this table
I would like to ask you: Imagine that you have a site and there
I would like to ask you about regular expressions preg_match have outlined below. I
Hi i would like ask you about .htacess 301 redirect: I have many dynamic
I would like to ask you about this simple ORDER BY (in T-SQL) clause.
I would like to ask for a recommendation on offline form format which user
I would like ask if there's a way to download an android layout from
I would like to ask such question, I have XML xsd`s, which generate beans
i would like to ask a question about @UsesJAXBContext annotation in jax-ws. I try
I would like to ask how to add data with links after the description

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.