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

  • Home
  • SEARCH
  • 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 9156033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:41:55+00:00 2026-06-17T12:41:55+00:00

I was use this code on button onClick for pick image from gallary I

  • 0

I was use this code on button onClick for pick image from gallary

I want to pass string from intent using putExtra and from the same activity, i try to get this value from onActiviryResult using getExtra but i am getting null vlaue. Is this any way to getting string value which i passed using intent, and this intent open gallery to pick image then return back to same activiy i want to get that string which i passed in intent.

  Intent intent = new Intent(); 
  intent.setType("image/");
  intent.setAction(Intent.ACTION_PICK);
  intent.putExtra("image_field_tag", field_tag);
  startActivityForResult(Intent.createChooser(intent, "Select Picture"), Integer.parseInt(fieldDetlKey));

from above code intent.putExtra("image_field_tag", field_tag); value i am getting null value in onActivityResult see the below code

@Override

protected void onActivityResult(int requestCode, int resultCode, Intent data){
     super.onActivityResult(requestCode, resultCode, data);
     Bundle bundle = data.getExtras();
     String imgTag = bundle.getString("image_field_tag");
     Log.d("image Tag", imgTag);
     Log.d("requestCode",""+requestCode);
     Log.d("resultCode", ""+resultCode);
}

I am getting the null value of variable imgTag, Please tell me how to get extra value from onActivityResult

Thanx,

  • 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-17T12:41:56+00:00Added an answer on June 17, 2026 at 12:41 pm

    when we want a result to be returned by the child activity, we need to call it by the method startActivityForResult(). When the child activity finishes with the job, it should set the data in an intent and call the method setResult(resultcode, intent) to return the data through the intent.

    For Detail .Refer this tutorial

    http://saigeethamn.blogspot.in/2009/08/android-developer-tutorial-for_31.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have tried to change the onClick image of a button using this code
If the user manually clicks the 'submit' button, i use this code: if (isset($_POST['submit_findall']))
this is the code that I use to disable the button $(#btnSubmit).attr('disabled', 'disabled') $(#btnSubmit).disabled
I use this code to select password field from the sql server 2012 db,
I have this code: Button give_review = (Button)findViewById(R.id.give_review); give_review.setOnClickListener(new Button.OnClickListener() { public void onClick(View
I'm trying to use this code which is an example taken from here https://gist.github.com/2383248
I use this code to create a custom tinymce button that changes a class
I want to store a javascript onclick function code into a string first and
I am using android-uitableview And I have this problem: When I use this code:
I need use this code: <%= button_tag :class => btn btn-primary do %> <%=

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.