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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:12:41+00:00 2026-05-26T04:12:41+00:00

I am having difficulty returning information from an activity, my understanding of the implementation

  • 0

I am having difficulty returning information from an activity, my understanding of the implementation is incomplete.

What I want is the user to be able to click a button to load up the android gallery, select an image, that image (or link to the image perhaps) is converted to a bitmap/drawable which appears in my activity’s UI layout.

I have the android gallery opening but I am not getting any response back from it (I know why, there are no intents in the gallery app – which I dont have access to in order to edit, but I dont know the solution)

 ImageView galleryClick = (ImageView)findViewById(R.id.addgallery);

    profilePic = (ImageView)findViewById(R.id.profilepic);

    galleryClick.setOnClickListener(new OnClickListener(){

        @Override
        public void onClick(View v) {
            // TODO Auto-generated method stub
            Intent intent = new Intent(Intent.ACTION_GET_CONTENT);  
            intent.setType("image/*");

            startActivityForResult(Intent.createChooser(intent, "Select Picture"),1);

        }

    });

What I was hoping was the onActivityFinished would be called in my handwritten activity, but that method is never called (I put a breakpoint in its code

 public void onActivityResult(int requestCode, int resultCode, Intent data) { 

   if (resultCode == RESULT_OK) {

       if (requestCode == 1) {
          // currImageURI is the global variable I'm using to hold the content:// URI of the image
          //currImageURI = data.getData();
       }
    }
}

solutions?

  • 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-26T04:12:41+00:00Added an answer on May 26, 2026 at 4:12 am

    If I understand your question correctly, I believe a similar question has been asked previously on Stack Overflow. Here’s the one I’m thinking of:

    Get/pick an image from Android's built-in Gallery app programmatically

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

Sidebar

Related Questions

Having difficulty making my javascript act the way I want. I have a button,
I am having a little difficulty. Basically I am sending information from a form
I'm having difficulty parsing some JSON data returned from my server using jQuery.ajax() To
Question: For typed in commands invoked via M-x I am having difficulty understanding how
I am having difficulty executing a MS SQL Server stored procedure from Java/jsp. I
I'm having difficulty getting the binding to fire off on a user control that
I'm having difficulty getting the GUI layout results I want in an Android app.
I am having difficulty redirecting the output from a console application to a Windows
I'm having difficulty returning JUST folders (ignore files) using a windows batch file. Here's
I am having difficulty understanding how exceptions are handled when code is fetched dynamically

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.