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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:04:34+00:00 2026-05-23T19:04:34+00:00

I am building an app which should only have a screen with three checkboxes

  • 0

I am building an app which should only have a screen with three checkboxes and a button to save the users’ choices about the checkboxes.

In case the user ticks a checkbox and clicks the button, then a certain Service should be started and running even if the app is closed -until the app is started again and the user unticks the checkbox and clicks the button again. Of course, if the user unticks the checkbox, I want that next time the app is started, the checkbox remains unticked, and viceversa.

So my question is, what kind of strategy could I address this? Normal PreferenceActivity? SharedPreferences?

Thanks everybody for the answers in advance 🙂

  • 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-05-23T19:04:35+00:00Added an answer on May 23, 2026 at 7:04 pm

    I used SharedPreferences for something similar to this, simply because it was an easy way to have my Service and Activities see the information.

    So, just have a RemoteService (http://saigeethamn.blogspot.com/2009/09/android-developer-tutorial-part-9.html) and an Activity.

    The Activity starts up and looks at the information, and can start up the service. If the user unchecks the box then it can stop the service.

    So, the service is always running when desired, and is not tied to the Activity, so when the Activity dies the service continues to run.

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

Sidebar

Related Questions

I am building an app in which the users can have different roles (like
I´m building an asp.net app, which technology I should use to get AJAX capabilities?
I have an app i building which is a simple naviagtion app. I do
I'm building an app in Rails 3. I currently have a user model which
I am building an android app in which I have to add a background
I'm building an android app which should perform a GET on my site to
I am building an iPhone app in which users (or employees) will be able
I'm building an app which is going to have to handle and store a
So I'm building an app using PHP and MongoDB which will have a fair
I am building an app which I only want it to be in Swedish.

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.