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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:13:49+00:00 2026-05-27T05:13:49+00:00

I have three activities, say I have the data from ActivityA, and I want

  • 0

I have three activities, say I have the data from ActivityA, and I want ActivityC to retrieve it but it must go through ActivityB which I don’t want it do anything about the passed data. Is there anyway to do it?

I have tried

ActivityA.java

Intent i = new Intent(this, ActivityB.class);
i.putExtra("DATA1", "Hello");
i.putExtra("DATA2", "World");
startActivity(i);

ActivityB.java doesn’t do anything about it but it must be seen before ActivityC.

ActivityC.java

Bundle b = getIntent().getExtras();
String data1 = b.getString("DATA1");
String data2 = b.getString("DATA2");

But it gives me this exception

11-30 02:12:05.165: W/dalvikvm(1134): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
11-30 02:12:05.185: E/AndroidRuntime(1134): FATAL EXCEPTION: main
11-30 02:12:05.185: E/AndroidRuntime(1134): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.src.test/com.src.test.ActivityC}: java.lang.NullPointerException
11-30 02:12:05.185: E/AndroidRuntime(1134):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
11-30 02:12:05.185: E/AndroidRuntime(1134):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
11-30 02:12:05.185: E/AndroidRuntime(1134):     at android.app.ActivityThread.access$2300(ActivityThread.java:125)
11-30 02:12:05.185: E/AndroidRuntime(1134):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
11-30 02:12:05.185: E/AndroidRuntime(1134):     at android.os.Handler.dispatchMessage(Handler.java:99)
11-30 02:12:05.185: E/AndroidRuntime(1134):     at android.os.Looper.loop(Looper.java:123)
11-30 02:12:05.185: E/AndroidRuntime(1134):     at android.app.ActivityThread.main(ActivityThread.java:4627)
11-30 02:12:05.185: E/AndroidRuntime(1134):     at java.lang.reflect.Method.invokeNative(Native Method)
11-30 02:12:05.185: E/AndroidRuntime(1134):     at java.lang.reflect.Method.invoke(Method.java:521)
11-30 02:12:05.185: E/AndroidRuntime(1134):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
11-30 02:12:05.185: E/AndroidRuntime(1134):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
11-30 02:12:05.185: E/AndroidRuntime(1134):     at dalvik.system.NativeStart.main(Native Method)
11-30 02:12:05.185: E/AndroidRuntime(1134): Caused by: java.lang.NullPointerException
11-30 02:12:05.185: E/AndroidRuntime(1134):     at com.src.test.ActivityC.onCreate(ActivityC.java:98)
11-30 02:12:05.185: E/AndroidRuntime(1134):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
11-30 02:12:05.185: E/AndroidRuntime(1134):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)

which points to String data1 = b.getString("DATA1");

Is there any way to do this correctly?

Any help would be greatly appreciated.

  • 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-05-27T05:13:50+00:00Added an answer on May 27, 2026 at 5:13 am

    When calling from B to C, add to your intent:

    myIntent.putExtras(getIntent().getExtras());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have three activities: Activity A - Displays a list of data from a
I have three tables. I have to retrieve the data using Linq statement. My
I have three activities in my app. I want to keep the screen awake
I have an application which pulls data from a webserver, putting this data in
Lets say I have three Activities in my App. 1) Signup Activity 2) AccountActivate
I have 2 Activities ActivityA & ActivityB , if you open ActivityA and select
I have three activities A, B and C. A starts B with startActivityForResult(getIntent(), ACTIVITY_B);
Ill first tell you what I am doing. I have three activities in the
Have three divs in a container that I want to float over a large
Say I have two Activities in an Android application, EditPerson and EditEmployee . It

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.