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

  • SEARCH
  • Home
  • 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 9217637
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:40:37+00:00 2026-06-18T02:40:37+00:00

So I would like to save an arrayList of strings in onPause and get

  • 0

So I would like to save an arrayList of strings in onPause and get it back in onResume but the problem is I can’t use sharedPreferences because my API level is 8 and I can’t use the putStringSet function. Also, I would like to avoid saving data to the user’s phone via a file system. I’m already doing that with several other things.

Is there any other way to save the data? I’ve tried putting a bundle in onPause and getting it in onResume and that hasn’t worked, I’ve also tried implementing onSavedInstanceState and onRestoreInstanceState but those only get called when the activity is destroyed and I’m only putting it on pause most of the time.

  • 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-18T02:40:38+00:00Added an answer on June 18, 2026 at 2:40 am

    You can use Modified Shared Preference to store your ArrayList. I was trying similar and I got answer for that. Here is the link. CustomSharedPreference

    Here You can create one class with getter and setter for ArrayList and that class as a object in Shared Preference.

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

Sidebar

Related Questions

I have a simple program where I would like to save an arraylist to
I would like to save a arraylist to the settings class...does any one have
I would like to save in a .txt two lineEdit but in different line.
I would like to know how to save an ArrayList of abstract Objects to
I would like to save a .html webpage with AFNetworking, but would also like
I would like to save my Weka classifier model to a file that can
Hey. I would like to save sensitive user data to my apps sandbox but
I would like to save data in cookies (user name, email address, etc...) but
I would like to save a message in PHP variable and send it back
I would like to save and load a set of images in Octave /

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.