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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:21:47+00:00 2026-05-25T11:21:47+00:00

i have 2 activities. 1-Messaging 2-fileBrowser from MESSAGING onButtonClick i call the FILEBROWSER activity.

  • 0

i have 2 activities.
1-Messaging
2-fileBrowser
from MESSAGING onButtonClick i call the FILEBROWSER activity. in the FILEBROWSER activity i take the path of the selected file and put it to a interface and then call the MESSAGING activity again like this :

  Intent i = new Intent(FileBrowser.this, Messaging.class);   
        i.putExtra(FriendInfo.P, path);  
        System.out.println("path at fb" + path);


        startActivity(i);
        this.finish();

now when i m returned back to the MESSAGING activity everything over here is null. all the variables and everything and if i call some other methods, the arguments i pass are also null. what do i do ?

  • 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-25T11:21:48+00:00Added an answer on May 25, 2026 at 11:21 am

    when first time you move Messaging to FileBrowser

    instead of stariActivity() 
    
    you can use StartActivityForResult() 
    

    method and at Activity FileBrowser just set result and put data in bundle then you can use this result in Messaging Activity’s

    onActivityResult(). 
    

    Then your Messaging Activity’s all variable remain same. No NULL value.

    EDIT: In MessagingActivity

      Intent intent = new Intent(Messaging.this, FileExplorer.class);
                intent.putExtra("Key", value);
                startActivityForResult(intent, RESULT_OK);
    

    and also make this method

      @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        // TODO Auto-generated method stub
        super.onActivityResult(requestCode, resultCode, data);
            if (resultCode == RESULT_OK) {
                //getting value from FileExplorer activity here
            }
    
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two activities A and B, and from activity A, I click on
I have 2 activities. MyMain MySecond I call MySecond activity in MyMain activity. And
I have two activities A, B . Now from A i call B by
I have three activities, A, B and C. User can start activity B from
In our app, we have Activities A,B,C,D, and E. The user usually goes from
I have three activities 1 is the main activity 2 is some other activity
I have two activities. Home activity contain a list view with two buttons named
I have 2 activities. In activity A when pressing a button sends you to
suppose that you have 3 Activities (A, B and C) and Activity A starts
I have a TabActivity that is the base Activity in my application. From the

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.