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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:26:13+00:00 2026-05-27T18:26:13+00:00

My application does file operations on the SD card (delete or update file). But

  • 0

My application does file operations on the SD card (delete or update file).
But when I connect the device to Windows 7 through USB, I do not see any changes. However I can confirm files where updated or deleted with adb shell.

I use an ASUS eee Pad with Android 3.0.

It seems devices running Android 3.0 have a different way to provide access to the file system (MTP instead of USB Mass Storage). I also read about how we can use MediaScannerConnection.scanFile to refresh the content of Windows File Explorer when adding a new file.

But how to trigger a refresh when files are deleted or updated?

I tried MediaScannerConnection.scanFile on the deleted file but it only creates an entry with size 0. MediaScannerConnection.scanFile on the whole folder does not work either.

Thank you for your help.

G.

  • 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-27T18:26:13+00:00Added an answer on May 27, 2026 at 6:26 pm

    So, as mentioned in the comment before. For now the best I’ve found is

    sendBroadcast(new Intent(Intent.ACTION_MEDIA_MOUNTED,
    Uri.parse("file://" + Environment.getExternalStorageDirectory())));
    

    After a file was deleted or updated seems to work.

    However, the device must be disconnected from USB. Otherwise you need to unplug and replug the device to see the changes.

    NOTE:
    On some devices this may trigger a onResume event on the current activity.

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

Sidebar

Related Questions

i have a j2me application , it does the File IO operation, but every
I have an ASP.NET web application which does the following: Reads an Excel file.
what does it means struts controller reads the struts-config.xml file when ever web application
After android installs an application from the Marketplace, does it keep the .apk file?
My application does not fit into the general purpose RDBMS schema category, I do
I have exceptions created for every condition that my application does not expect. UserNameNotValidException
strange problem with php on windows... my application loads a 'core' file that loads
I have Winform application,which does some operation in loops (file access, copy file, ....).
My application does a good deal of binary serialization and compression of large objects.
Ok my application does everything that is it suppeded to do and it does

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.