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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T23:56:50+00:00 2026-06-10T23:56:50+00:00

I have 2 Activity files. 1 activity is for Setup and other is for

  • 0

I have 2 Activity files. 1 activity is for Setup and other is for main.

In one Activity I have a code to show phone number device so if user has ever setup he will forward in second activity .
I Need to start with Setup Activity.

Can you tell me , how to make it?

  • 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-10T23:56:51+00:00Added an answer on June 10, 2026 at 11:56 pm

    Start your application with the Setup Activity. Define SharedPreferences to check if the user has already entered the email or not. If there is no email present, ask the user for the email and store it in the SharedPreferences and proceed to the next Activity.

    Next time when the application is started, you will find the email in the SharedPreference string variable and hence go to the next activity directly.

    Something like this :

    public void onCreate(){
        String user_email = getSharedPreference("PREFERENCE", MODE_PRIVATE).getString("userEmail",null);
        if (user_email == null){
       [Get the email from the User, something like xyz@example.com and store it in a String userEmail]
       String userEmail = ....//input email from user 
        // Save the state
        getSharedPreference("PREFERENCE", MODE_PRIVATE)
            .edit()
            .putString("userEmail", userEmail)
            .commit();
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an activity that opens txt files. And everytime a user wants to
I have created an activity called viewActivity. It displays the shared files and folders
In an Activity, I have some snippet of code that fires off a Message:
Assume that we have 3 different activities. Each activity has its own XML file
SETUP : I have this app which has 4 activities in a linear path,
I have an activity which I want to show ListView with list of topics,
Throughout our enterprise we have many applications that log activity to text files for
I'm working on an Android application. I have an activity that has this method:
Currently we have a sequential workflow in sharepoint 2010 that has a delay activity.
I have an activity that when users press share on a file it would

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.