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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T08:35:46+00:00 2026-06-14T08:35:46+00:00

In my project I am developing at the moment, I have many configuration settings.

  • 0

In my project I am developing at the moment, I have many configuration settings. Things such as

  • Alarm times
  • Amount of items to retrieve from the server
  • LocationManager integers such as minium location

These are all static final and are all in a class that corresponds to the value.

My question is, are there any problems with moving all of these values to a single static class?

My thinking is that when it comes to testing and tweeking the app, it will be easier to manage.

  • 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-14T08:35:47+00:00Added an answer on June 14, 2026 at 8:35 am

    Building on @Snicolas’s answer…

    You should indeed persist your CONFIGURATION settings outside of code (file or database). BUT you should not “read” that configuration each time a value is required, that would be inefficient.

    Using a class to manage configuration (ie. AppSettings) is a good idea. Making it static is one way to provide singleton-like access. In C# and ASP.NET a web app will guarantee one and only one instance of a static class and therefore multiple un-related requests from different users will share the exact same static values.

    But in your case (I see the tag ‘android’) using Java your best bet may be a Singleton approach. I don’t know how garbage collection works in Java but I’d say you should use a singleton to ensure one-and-only-one instance of your settings. The singleton Ensures an instance exists (or creates one if not) and then provides it to the caller.

    This may also make it easier to support the ability to change configuration values while the app is running — you can “watch” for setting changes on a regular basis.

    I’m not a Java man but I’d be surprised (well no not really) if there wasn’t already a library for handling this very problem.

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

Sidebar

Related Questions

Developing a project of mine I realize I have a need for some level
In Eclipse, static html project: Developing Chrome extension, it would be nice to have
I have a question regarding an iPhone game I'm developing. At the moment, below
I'm developing for a project where HTML designers use PHP methods to retrieve content.
I have a project ongoing at the moment which is create a Windows Service
I have recently started on a project developing a window mobile/ce buisiness application. I
I am developing project using Spring , Struts2 & Hibernate . Now I want
I'm developing a project in Symfony2(.0.x) and I'm building a simple auto login system.
I am developing a project which works with multiple arithmetic types. So I made
i am developing a project that its domain is meaningful in my native language.

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.