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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:24:28+00:00 2026-05-26T08:24:28+00:00

I am using a code which is listing all the images from my device…and

  • 0

I am using a code which is listing all the images from my device…and I’m trying to figure it out how to get images only from a specific folder, not all the images. Here is the code I’m using :

ArrayList<Bitmap> images = new ArrayList<Bitmap>();
String[] projection = {MediaStore.Images.Thumbnails.DATA};
Uri uri = Uri.parse("content://media/external/images/media");
cursor = managedQuery( uri, projection, null, null, null);
//cursor = managedQuery( MediaStore.Images.Media.EXTERNAL_CONTENT_URI, projection, null, null, null);
Log.i("MediaStore.Images.Media.EXTERNAL_CONTENT_URI", "MediaStore.Images.Media.EXTERNAL_CONTENT_URI: " + MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
if(cursor.getCount()==0){
     Log.i("No Cards","No Cards");
     cursor.close();
 } else if(cursor.getCount()>0){        
 for(cursor.moveToFirst(); cursor.moveToNext(); cursor.isAfterLast()){
     int columnIndex = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
     String imagePath = cursor.getString(columnIndex);
     Log.i("imagePath", "imagePath: " + imagePath);
     Bitmap b = BitmapFactory.decodeFile("/Stampii" + imagePath, null);
     images.add(b);
  }
  }

The thing that I want to do is to get images from imagePath: /mnt/sdcard/Stampii/MediaCategory-251.jpg Stampii folder, but I can’t understand how to enter the right path to that folder. I’ve already tried with :

Uri uri = Uri.parse("content://media/external/images/media/mnt/sdcard/Stampii");

Any 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-26T08:24:28+00:00Added an answer on May 26, 2026 at 8:24 am

    use

    File file = new File(Environment.getExternalStoragePath()+"/Stampii/");
    
    file imageList[] = file.listFiles();
    
     for(int i=0;i<imageList.length;i++)
     {
       Log.e("Image: "+i+": path", imageList[i].getAbsolutePath());
    
       Bitmap b = BitmapFactory.decodeFile(imageList[i].getAbsolutePath());
    
       images.add(b);
    
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using some code which was originally taken from the Apple sample ViewTransitions
i am generating *.reg file using code which will have some important data. and
I'm using a code which will upload an image, put the image in the
Currently i'm using below code which works well. $(#topperAtBaseLevel:visible, #lowerAtBaseLevel:visible, #midAtBaseLevel).hide(); any optimised code?
I am looking at code which has the correct using statements declared but yet
Given the following lines of code which is using JQTOUCH: $('#customers').bind('pageAnimationEnd', function(e, info){ if
I've inherited some code which breaks a page up into tabs using divs. On
Today I had to fix some older VB.NET 1.0 code which is using threads.
i'm using DbSimple, but there is some code which i could write into another
Greetings, SO. I have some code which I've made attempts at compiling using gcc,

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.