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

The Archive Base Latest Questions

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

In My Android Camera Application, I am using this code to get Select Image

  • 0

In My Android Camera Application, I am using this code to get Select Image from the Android Gallery.

Intent intent = new Intent(); 
                intent.setType("image/*"); 
                intent.setAction(Intent.ACTION_GET_CONTENT);// 
                //startActivity(intent);
                startActivityForResult(Intent.createChooser(intent, "Select Picture"),10);
                //finish();

I got the Gallery and all seems fine. but while i select on perticular image on the Gallery then nothing is happend and the activity of gallery get finish.

I want to Select that image and do some operation on it.
How it is possible ??

  • 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-26T12:41:46+00:00Added an answer on May 26, 2026 at 12:41 pm

    As you are starting the ActivityForResult you need to write onActivityResult and you can get the output of the called intent in that like this,

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        if (requestCode == 10 && resultCode == Activity.RESULT_OK) {    
            Uri contentUri = data.getData();
    
            String[] proj = { MediaStore.Images.Media.DATA };
            Cursor cursor = managedQuery(contentUri, proj, null, null, null);
            int column_index = cursor
                    .getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
            cursor.moveToFirst();
            String tmppath = cursor.getString(column_index);
    
    
            Bitmap croppedImage = BitmapFactory.decodeFile(tmppath);
            iv.setImageBitmap(croppedImage);    //set to your imageview     
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi I'm using this to open up the native android camera application Intent camera
I am trying to implement Camera application in android,and i got some code from
Hi guys I am using the following code to access Camera from my application
Im using a camera application in android. I want to pass the byte data
i have problem using camera in my Android application i have a form for
I'm developing an augmented reality application for Android that uses the phone's camera to
I'm looking at the Android Camera code, and when I try importing android.os.SystemProperties ,
When I take pictures using android.hardware.camera and I save them to the following location
I'm new to Android application development and I'm currently experimenting with various UI ideas.
I am developing the camera module for an android application. In main application when

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.