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 8966743
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:05:11+00:00 2026-06-15T17:05:11+00:00

I am currently working on an application where the user is presented with a

  • 0

I am currently working on an application where the user is presented with a series of lists, clicking on each list the user is taken to another list based on his selction. Now in order to remember what the user does on each screen, i insert a series of strings into my Shared Preferences. As it turns out, as my app has about 7 8 selection screens, my whole code is just tangled up with reading and writing keys from the shared preferences.

air_conditioning = Session.getBoolean(SELL_AIR_CONDITIONINING) ? "1" : "0";
        power_steering = Session.getBoolean(SELL_POWER_STEERING) ? "1" : "0";
        power_locks = Session.getBoolean(SELL_POWER_LOCKS) ? "1" : "0";
        power_mirrors = Session.getBoolean(SELL_POWER_MIRROR) ? "1" : "0";
        keyless_entry = Session.getBoolean(SELL_KEYLESS_ENTRY) ? "1" : "0";
        cruise_control = Session.getBoolean(SELL_CRUISE_CONTROL) ? "1" : "0";
        navigation_system = Session.getBoolean(SELL_NAVIGATION_SYSTEM) ? "1" : "0";
        abs = Session.getBoolean(SELL_ABS) ? "1" : "0";
        am_fm_radio = Session.getBoolean(SELL_FM_AM_RADIO) ? "1" : "0";
        cassette_player = Session.getBoolean(SELL_CASSETE_PLAYER) ? "1" : "0";
        cd_player = Session.getBoolean(SELL_CD_PLAYER) ? "1" : "0";
        sun_roof = Session.getBoolean(SELL_SUN_ROOF) ? "1" : "0";
        alloy_rims = Session.getBoolean(SELL_ALLOW_RIMS) ? "1" : "0";

So this is basically my whole code, which looks ugly, prone to errors, and not very maintainable. I was looking for any solution that would serve me in this case.

Kind Regards

  • 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-15T17:05:13+00:00Added an answer on June 15, 2026 at 5:05 pm

    Don’t use SharedPreferences. Use Intents and pass the state via a Bundle.

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

Sidebar

Related Questions

I'm currently working on an ASP.Net WebForms application that allows a user to select
I am currently working on an application which requires different behaviour based on whether
I am currently working on an MVC3 ASP.NET application which requires the user to
I am currently a developer working on a very task specific application; the user(s)
I'm currently working on a small application that works like this: When the user
I'm currently working on a web application that allows the user to upload files
I'm currently working on an application which allows the user to read and a
Am currently working on an application that requires users to submit posts and comments
I am currently working on an application in VB.NET im my spare time and
I'm currently working in an application that has to navigate a webpage and recollect

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.