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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T01:52:37+00:00 2026-06-05T01:52:37+00:00

Hi am newbie to java and android. Assume function demo() from the screenone is

  • 0

Hi am newbie to java and android.

Assume function demo() from the screenone is going to display some values on Textview which is on the same screen(screenone).

But i need to display that resultant value to the next screen ie.(screen two)

public void demo(){
{
 .....
 .....
}

So i have included these line to

screenoneActivity.java

Intent nextScreen = new Intent(getApplicationContext(), SecondtwoActivity.class);
nextScreen.putExtra("","");
startActivity(nextScreen);
demo();

ScreentwoActivity.java

@Override
protected void onCreate(Bundle savedInstanceState) 
{

    super.onCreate(savedInstanceState);

    setContentView(R.layout.main1);

    TextView txtName = (TextView) findViewById(R.id.textView1);

    Intent i = getIntent();

    txtName.setText(name);

I did these things so far.I don’t know how to do transfer data from demo() function to the next screen.

Can anyone give me clues or ideas to achieve this.

Thanks a lot!..

  • 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-05T01:52:39+00:00Added an answer on June 5, 2026 at 1:52 am

    You need to send some value into the putExtra methods parameters to be able to get something out of it.

    In your first activity(A):

    Intent i = new Intent(A.this, B.class);
    i.putExtra("someName", variableThatYouNeedToPass);
    startActivity(i);
    

    In your second activity(B):

    Bundle extras = getIntent().getExtras();
    int fetchedVariable = extras.getInt("someName");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am a newbie to Android and Java and want to write a function
I'm a completely newbie to android programming, having done some java for my computing
Just a simple question from a relative Java newbie: what is the difference between
I'm a newbie in both Java and Android and I'm trying to figure out
I am newbie in java/android. I am a c/c++ developer. May i know how
I am a newbie to java and android world, and I want to use
I am a total newbie when it comes to both java and android coding.
Im a newbie to android and with the help of some experts i write
I'm a newbie to Android and Java--lots of experience with C/C++/C#. I have in
I am newbie in android development. I am good at Java, but not Android

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.