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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:54:51+00:00 2026-05-26T07:54:51+00:00

I implemented the application for getting image from the camera album in sdcard.But it

  • 0

I implemented the application for getting image from the camera album in sdcard.But it is not working properly.

Here Intent returns like this Intent { act=com.htc.HTCAlbum.action.ITEM_PICKER_FROM_COLLECTIONS dat=content://media/external/images/media/9 typ=image/jpeg (has extras) }

In the code

Bitmap thumbnail = (Bitmap) data.getExtras().get(“data”);
Here (Bitmap) data.getExtras().get(“data”)
this part returns null.

How to get the bitmap here please can anybody help me.

Code:

cam_images_btn.setOnClickListener(new OnClickListener(){

        @Override
        public void onClick(View v) {

             Intent cam_ImagesIntent = new Intent(Intent.ACTION_GET_CONTENT);
             cam_ImagesIntent.setType("image/*");
             startActivityForResult(cam_ImagesIntent, CAMERA_IMAGES_REQUEST); 
        }       
    }); 

    if(requestCode == CAMERA_IMAGES_REQUEST && resultCode==Activity.RESULT_OK)
    {
        System.out.println("data(CAMERA_IMAGES_REQUEST):"+data);
        if(data != null)
        {           
            Bitmap thumbnail = (Bitmap) data.getExtras().get("data"); 
            System.out.println("Bitmap(CAMERA_IMAGES_REQUEST):"+thumbnail);
            System.out.println("cap_image(CAMERA_IMAGES_REQUEST):"+cap_image);
            cap_image.setImageBitmap(thumbnail); 
        }
        else
        {
            System.out.println("SDCard have no images");
            Toast.makeText(camera.this, "SDCard have no images", Toast.LENGTH_SHORT);        
        }
    }

thanks

  • 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-26T07:54:52+00:00Added an answer on May 26, 2026 at 7:54 am

    Do the following in your code:

     if(data != null)
        {           
            Uri selectedImageUri = data.getData();
            filestring = selectedImageUri.getPath();
    
          Bitmap thumbnail = BitmapFactory.decodeFile(filestring, options2);
    
            System.out.println("Bitmap(CAMERA_IMAGES_REQUEST):"+thumbnail);
            System.out.println("cap_image(CAMERA_IMAGES_REQUEST):"+cap_image);
            cap_image.setImageBitmap(thumbnail); 
        }
    

    This should work.

    Edit:
    Also if you want a “thumbnail” do the following:

    Bitmap bitmap = MediaStore.Images.Thumbnails.getThumbnail(
                        getContentResolver(), selectedImageUriId,
                        MediaStore.Images.Thumbnails.MICRO_KIND,
                        (BitmapFactory.Options) null);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I implemented c2dm in my application.Also am getting c2dm message from the third party
I'm working on a real time application implemented using in a SOA-style (read loosely
In my just-completed project, I was working getting distributed transactions working. We implemented this
I have implemented an application for get the images from external storage when user
I have a VB6 application implemented as an ActiveX exe. I also have a
My application is implemented as a service (running under services.exe). I am adding a
I implemented a WPF application which use NavigationService to navigate between pages. When I
How is application pool implemented in IIS? Is each application pool equivalent to a
We have issues within an application using a state machine. The application is implemented
I implemented threading in my application for scraping websites. After all the sites are

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.