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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T17:46:00+00:00 2026-06-06T17:46:00+00:00

I am creating an app that requires some settings to be set first before

  • 0
  • I am creating an app that requires some settings to be set first
    before starting the display activity.
    I would like the app to check if a preference file (that contains these settings) exists and if it does exist move to a
    particular activity or remain in the main activity(as the settings
    activity is my main activity).

  • I tried to use startactivty() on startup, but it shows the settings
    menu for a fraction of a second before moving on to the display
    activity.

  • how should I do it?

    I tried the following code:

        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);          
            SharedPreferences prefsfile = getSharedPreferences("myfile",0); 
    
            if( prefsfile!=null & Timetablledisplay.flag==0){
                Intent i=new Intent(ProjectBunkitActivity.this,Timetablledisplay.class);
                startActivity(i);
            }
    
  • 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-06T17:46:01+00:00Added an answer on June 6, 2026 at 5:46 pm

    An option for a potential workaround for this problem would be taking a slightly different approach:

    Instead of launching into Settings, and then deciding whether or not to go to the Timetablleddisplay activity, you could start in a blank activity that simply decides which activity to launch.

    The activity could be something like this:

    super.onCreate(savedInstanceState);      
        SharedPreferences prefsfile = getSharedPreferences("myfile",0); 
    
        if( prefsfile!=null && Timetablledisplay.flag==0){
            Intent i=new Intent(CURRENT.this,Timetablledisplay.class);
            startActivity(i);
            finish();
        }
        else
        {
            Intent i=new Intent(CURRENT.this,ProjectBunkitActivity.class);
            startActivity(i);
            finish();
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am in the process of creating an iPhone app that requires to interact
I am new at Mac OSx development. The app that I am creating requires
Right now I'm creating a web-app which requires that multiple sets of data (including
I'm creating an app that will need users to create an account. (Like Facebook
I am creating an Android app that requires me to do a rest request
I have a Java web app that offloads some environment specific settings (Hibernate configurations,
I've been reading about creating my first facebook app. Some sites say I need
I am currently creating an Android app that requires using the Android phone's name
I am creating an app that will point a simple arrow in the direction
I am creating an app that is a ticket sales system. On the checkout

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.