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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:42:29+00:00 2026-05-25T15:42:29+00:00

Through my Android program I wrote a file like this: String file = Environment.getExternalStorageDirectory().getAbsolutePath()

  • 0

Through my Android program I wrote a file like this:

String file = Environment.getExternalStorageDirectory().getAbsolutePath() + "/Files/hello.txt";
BufferedWriter writer = new BufferedWriter(new FileWriter(file));
writer.write(str+"\n");     \\yeah string has a value there
writer.close();

Now when I go to Android’s “Astro” File browser, I can see the file hello.txt in /mnt/sdcard/Files but when I mount the sdcard in Windows, I can only see 4 other files which were there in that folder but not hello.txt.

In Windows itself, I even tried to uncheck the hide hidden files option just to ensure that the file is not hidden but it’s just not visible.

I even tried to write the file in root of the sdcard but again same problem. Now I’m surprised that how is it possible that I can see the file in Android but not in Windows. In Android I’ve even checked the file contents and everything looks fine.

What could be the problem? Is the way I’m writing the file wrong?

PS: yes the Manifest permission android.permission.WRITE_EXTERNAL_STORAGE is added.

  • 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-25T15:42:30+00:00Added an answer on May 25, 2026 at 3:42 pm

    Ok, I figured out why it was happening.
    Actually even if we press “Back” button, the program keeps running and unless I go to Settings > Applications > Manage Applications > "Force Stop" <application> I can’t access the file written by this program even if it is on sd card and even if the filewriter has been closed.

    This is just based on my observation and I’d like someone to post a better answer with facts and with solution.

    edit: I’ll update my question accordingly.

    edit: as recommended on meta I’ve posted a new question

    Can’t see a file in Windows written by an android app on sd-card unless I “Force Close” the app

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

Sidebar

Related Questions

Hello I wrote a program (on Android NDK), which gives audio buffer through JNI
In my Android program, I have some code that downloads a file. This works
I'm new to Android, I've followed the hello world tutorial through and have a
I am going through the android hello world tutorial, and have been stuck when
Is there any possibilities to force stop the android application through program. previously i
I would like to run something through an Android emulator. Does anyone know if
I have created some files through my android application. I want to remove these
While working my way through the Android tutorials, I came across something I don't
I need directions on how to start the android browser through code . Thanks
I've read through the FAQ of Android Dev Guid (http://developer.android.com/guide/appendix/faq/commontasks.html#opennewscreen ) but I'm not

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.