Ok the files will be small so i'll save them to the app data folder. My next
question is where is that folder located and how to I go about saving a file
to it? Is there an easy way to just pass the URL for the xml file and have
it save or would I need to open a file reader read the file to another
document builder and then save it?

 

Thanks!

 

From: [email protected]
[mailto:[email protected]] On Behalf Of ~ TreKing
Sent: Thursday, April 22, 2010 2:51 PM
To: [email protected]
Subject: Re: [android-developers] Save file to sd card?

 

On Thu, Apr 22, 2010 at 1:03 PM, Tommy <[email protected]> wrote:

Should I create a specific folder in my project to save to and if so how do
I save the file.

 

You can't write to folders in your project. You app, however, has a
dedicated data folder you can read from and write to.

 

Or should I make it to where when you click the Save button it checks for an
SD card and if there is and SD card create a folder(if one isn't already
there) and save the file in the new folder or save it to the phone?

 

That's up to you, either way works. Though if the file is huge, the SD is a
better option.

 

If someone could explain the most efficient way of saving files for my app
and how to save the file from the web server I would greatly appreciate the
insight. Any tutorial links would be awesome.


This is pretty standard Java IO stuff. Look at the Android documentation for
how to write to your app's data space and to the SD card, and Google around
for Java IO. That should be all you need.


----------------------------------------------------------------------------
---------------------
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

-- 
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

-- 
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