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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T09:41:07+00:00 2026-06-10T09:41:07+00:00

We are saving the following from one application: final CheckBoxPreference mCheckPref = new CheckBoxPreference(sContext);

  • 0

We are saving the following from one application:

final CheckBoxPreference mCheckPref = new CheckBoxPreference(sContext);
mCheckPref.setKey("alertnotification");

and we are retrieving it from a second application follows:

mContext = context.createPackageContext("com.android.abc",Context.CONTEXT_INCLUDE_CODE |     Context.CONTEXT_IGNORE_SECURITY);
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(mContext);
boolean alertnotification = prefs.getBoolean("alertnotification",true);

I always get the alertnotification as false, even during the first time where I have set the default value to be true. Why does this happen?

  • 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-10T09:41:07+00:00Added an answer on June 10, 2026 at 9:41 am

    http://developer.android.com/reference/android/content/SharedPreferences.html

    “Note: currently this class does not support use across multiple processes. This will be added later.”

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

Sidebar

Related Questions

I've implemented application state saving/loading in onSave/RestoreInstanceState and onCreate in one of my android
I have been trying to get one of the attributes from the following xml,
I have the following grabber that is downloading empty files and saving them to
I am doing the following. 1) I am exporting a database and saving it
I'm trying to use the entity framework to take data (nested relationships) from one
I have the following calls in one of my classes @Override public Integer save(NewsItem
I hope you can help me with this one. My application is monitoring a
I am new to sturts2 and hibernate frameworks. I am making test web application.
I am implementing OnSaveChanges() when saving an entity. Apart from finding out all the
Follow on from a previous question One first screen activity I am clicking a

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.