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

The Archive Base Latest Questions

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

on api level 4 (android 1.6), after taking photo using: Intent intent = new

  • 0

on api level 4 (android 1.6), after taking photo using:

Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
File photo = new File(Environment.getExternalStorageDirectory(), "NewPic.jpg");
intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(photo));
imageUri = Uri.fromFile(photo);
startActivityForResult(intent, TAKE_PICTURE);

I’d like to look through all my photos thumbnails, but there is no my last photo thumbnail. It works perfectly on android 2.1.

If I connect device via USB to PC and then disconnect file will appear, after finished scanning. So how should I start that indexing?

I tried

mScanner = new MediaScannerConnection(getApplicationContext(), this);
mScanner.connect();
mScanner.scanFile(imageUri.getEncodedPath(), "*/*");

And end with this:

02-24 17:13:54.678: DEBUG/MediaScannerService(1320): IMediaScannerService.scanFile: /sdcard/NewPic2222.jpg mimeType: */*
02-24 17:13:54.688: VERBOSE/MediaProvider(1320): /sdcard volume ID: 1149784819
02-24 17:13:54.688: VERBOSE/MediaProvider(1320): key exists

EDITED LATER

I’ve got sth like this in other activity

mCursorThumbnails = MediaStore.Images.Thumbnails.queryMiniThumbnails(mContentResolver, MediaStore.Images.Thumbnails.EXTERNAL_CONTENT_URI, MediaStore.Images.Thumbnails.MINI_KIND, projection);
mCursorImages = MediaStore.Images.Media.query(mContentResolver, MediaStore.Images.Media.EXTERNAL_CONTENT_URI, projection);

When I check count of first value I’ve got 13 elements, and on the second I’ve got 14. So the image has been added to mediascanner, but OS hasn’t generated thumbnail for it. So how should I ask OS to create one?

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

    after taking picture try calling insert() function of ContentResolver passing the information about the picture.

    public final Uri insert (Uri url, ContentValues values)
    

    It will actually add the picture to the database and create picture’s thumbnail image for you. It will also be added to the thumbnail database. Hope this helps!

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

Sidebar

Related Questions

I wrote an application using the Android 2.2 SDK (API level 8). It is
When I create a new Android Sample Project from eclipse with api level 14,
I am using API level 8 , documentation says its available after API level
I am new to work with android tablet api level 12. I have created
I'm using Android with Api level 8 and I want to get the Address
I am looking into using the new Backup API that available since Android 2.2,
Android API level 8 introduced the Context.getExternalFilesDir() method, providing a File object reference to
How to get Bluetooth Headset connection state (connected/disconnected) using android api level 8 on
Does anyone know how to access ALSA (low-level audio API) in Linux using Mono?
How to decode a base64 encoded string to byte array on Android API level

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.