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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:24:02+00:00 2026-05-28T01:24:02+00:00

in this tutorial : http://mobile.tutsplus.com/tutorials/android/android-user-interface-design-building-application-preference-screens/ they talk about the preference state, and the following

  • 0

in this tutorial : http://mobile.tutsplus.com/tutorials/android/android-user-interface-design-building-application-preference-screens/
they talk about the preference state, and the following method checks wether to set the alarm or cancel it, depending on the boolean in getBackgroundUpdateFlag :

protected void onPause() {
    super.onPause();
    Context context = getApplicationContext();
    if (TutListSharedPrefs.getBackgroundUpdateFlag(getApplicationContext())) {
        setRecurringAlarm(context);
    } else {
        cancelRecurringAlarm(context);
    }
}

So there is another method that should “set” the pref called setBackgroundUpdateFlag , but they say :

Although we’ve added a setBackgroundUpdateFlag() method for completeness, we will not be using this method. Read on to see why.

So how can we know when the checkBox Preference is checked, so that the pref state is set to “true”, if we don’t use the set method? is there something done automatically with the Preference CheckBox item from the XML ?

I don’t understand how the pref is updated. ?

Thanks for your help

  • 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-28T01:24:03+00:00Added an answer on May 28, 2026 at 1:24 am

    Yes, preferences state is persisted automatically. You can read that state and you can also add a listener to have your method called back when a preference changes state.

    Take a look at the directory /data/data/..your_app../ on your phone, you will see an XML with the saved preferences. (don’t know if it can be viewed on non rooted phones).

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

Sidebar

Related Questions

i have been following this tutorial for the pagerAdapter. http://mobile.tutsplus.com/tutorials/android/android-user-interface-design-horizontal-view-paging/ My problem is that
I followed the tutorial at: http://mobile.tutsplus.com/tutorials/android/android-listview/ and was able to successfully run the application.
Kind of following this tutorial here: http://mobile.tutsplus.com/tutorials/iphone/iphone-core-data/ I use the fetch records method in
I'm trying to follow this tutorial about WP7 development: http://mobile.tutsplus.com/tutorials/windows/introduction-to-windows-mobile-7-development/ It's talking about using
I'm going through a tutorial here: http://mobile.tutsplus.com/tutorials/android/android-sdk-development/ . I have finished the tutorial and
I've followed this tutorial: http://anandhansubbiah.com/blog/writing-your-first-android-application/ , but no matter what I do, and what
I am integrating this Twitter API in my project. http://mobile.tutsplus.com/tutorials/iphone/twitter-api-iphone/ This is running well
Hi I have used this tutorial http://net.tutsplus.com/tutorials/javascript-ajax/submit-a-form-without-page-refresh-using-jquery/ to create php - jquery - ajax
I'm going through this tutorial: http://tutorials.jumpstartlab.com/projects/jsattend.html In iteration 7, step 3 we get to
I'm working through this tutorial: http://www.killerphp.com/tutorials/object-oriented-php/php-objects-page-3.php At first he has you create a setter

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.