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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T00:12:46+00:00 2026-05-20T00:12:46+00:00

Beginner android question. Ok, I’ve successfully written files. E.g. // get the file name

  • 0

Beginner android question. Ok, I’ve successfully written files. E.g.
// get the file name
String filename = getResources().getString(R.string.filename);

        FileOutputStream toWriteTo;
        try {
            toWriteTo = openFileOutput(filename, MODE_WORLD_READABLE);
            // get the string to write
            String toWrite = getResources().getString(R.string.contentstowrite);
            toWriteTo.write(toWrite.getBytes());
            toWriteTo.close();

            ...         
               }
        catch (Exception ex) {
            Toast.makeText(HelloFilesAppActivity.this, "fail!", Toast.LENGTH_SHORT).show();
        }
        }});

And I’ve proved that it is there by reading it and displaying contents, even using getFilesDir() and displaying all of the files in the folder.

Everything I read says that the files are in /data/data//files/
But I cannot find them. (I’m on Windows XP). My install didn’t use default locations because my C:\ is pretty full. I looked in C:\Documents and Settings\Mike\.android\avd and in the project folder and in the place I installed the SDK: D:\Program Files\Android\android-sdk-windows. So where is /data/data/ ?

I read that I can use ADB to push and pull files back and forth, but I’m using Eclipse ADT and I’d prefer to use something other than command line. The book I’m using seems to imply that you can use Eclipse but then proceeds to give the command-line commands.

I found info about the Project Explorer in the DDMS, but I don’t see the files I have written.

I’ve been working under the assumption that I might want to create a text file using some other means in Windows that I would read with my App. So if the answer is “why do you want to do this?”, that’s what I’m after. Eventually a DB probably too (that’s in the next chapter 🙂 ).

Do I have to use the ADB command line?

thanks

Mike

  • 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-20T00:12:47+00:00Added an answer on May 20, 2026 at 12:12 am

    http://developer.android.com/guide/topics/data/data-storage.html

    The method your using to get the directory you read/write to:

    openFileOutput()

    You can save files directly on the device’s internal storage. By default, files saved to the internal storage are private to your application and other applications cannot access them (nor can the user). When the user uninstalls your application, these files are removed.

    You’ll want to save the files your working with to the SD card.

    Try this:

    getExternalStoragePublicDirectory Example

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

Sidebar

Related Questions

A beginner question, bear with me: I'm just wondering under what circumstances one should
A beginner's question. I'm building a .swf with Flex Ant. To my .swf I
Once again a very beginner-ish question, but here I go: I would like to
What database should a beginner use in the C language? Can I use MySQL?
I'm not a beginner at C# but I really need to increase my understanding,
I am a complete beginner trying to develop for FCKeditor so please bear with
As a complete beginner with no programming experience, I am trying to find beautiful
The very common beginner mistake is when you try to use a class property
I'm a complete beginner when it comes to programming. I'm taking a stab at
I'm a Lisp beginner. I'm trying to memoize a recursive function for calculating the

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.