Thank you VERY much Mark!

Can you please me tell me what a typical path may look like?

For example if the app creating the text file has the package:
come.exideas.test

What would the path look like; is that consistent across all Android
Os?

Thank you very much.

On Dec 1, 4:10 pm, Mark Murphy <[email protected]> wrote:
> Use Java file I/O. You will need to know the path to the file in
> question, hopefully supplied to you by the other application.
>
>
>
>
>
>
>
>
>
> On Thu, Dec 1, 2011 at 7:07 PM, Saied <[email protected]> wrote:
> > Hello,
>
> > The docs say:
> >  "MODE_WORLD_READABLE File creation mode: allow all other applications
> > to have read access to the created file."
>
> > So I can do this:
>
> > public void writeTextFile() {
> >        String FNAME = "test.txt";
> >        String CONTENT = "Write this test string to test.txt file";
>
> >        FileOutputStream fOut = null;
> >        OutputStreamWriter osw = null;
> >        try{
> >                fOut = openFileOutput(FNAME, Context.MODE_WORLD_READABLE );
> >                osw = new OutputStreamWriter(fOut);
> >                osw.write(CONTENT);
> >                osw.close();
> >                fOut.close();
>
> >        }catch(Exception e){
> >                e.printStackTrace(System.err);
> >        }
> >    }
>
> > Now, how do I READ it from ANOTHER application?
>
> > Thanks for your help.
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android 4.0 Programming Books:http://commonsware.com/books

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to