Directory to store files

by LD » Mon, 27 Apr 2009 16:23:38 GMT


Sponsored Links
 Hello,

can anybody advice what is the recommended directory to store files
generated by your application: audio files, video files or some
images.

If the phone contains SD card, it is clear that files should be saved
there, but if there is no any external storage. where would you
recommend to save to?

Thanks

--~--~---------~--~----~------------~-------~--~----~



Directory to store files

by Odessa Silverberg » Tue, 28 Apr 2009 22:15:56 GMT


 Depends what you're going to save there. If it's some vital data to
the application to work (i.e. SQLite Database, Preferences, etc.) then
you have to save them in your applications directory on the phone.

If it's some downloaded files, MP3s, Videos etc. then you can save it
on the SD card. The home directory of an app is /data/data/
<yourappspackangename>/ but you should use the context instead of
absolute path names.



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. Issues..urgent reply will be useful..as deadline is reaching...

Hi all,
I have the following questions. Your urgent replies and help will be
most valuable as time is running out and I haven't done much yet.

1. How to add linear layouts (sub layouts to the main layout) one by
one? Suppose I have a button or spinner in one row and want to add a
text box and a button as a separate row below that, how do I do that?
A code snippet could be helpful please..

2. I am using the CheckBoxified Text tutorial posted in "Novice
Tutorials' for a User preferences page. In mc5, I am not seeing the
first option in the choices by default, and only when I move mouse
over, I can see the first choice. This is true with the sourcecode as
it is in the tutorial or for my own CheckBoxifiedtext. Can someone
tell why this is so?

3. The other most glaring problem with the CheckBoxified text is that
I am always getting the values of getChecked() function as false. I
have a Save and Cancel button in my page where I set the values of
CheckBoxified items to boolean variables upon Save. The variables are
false even when I check a few checkboxes. What could be the problem?
Was this getChecked() really tested in the tutorial sourcecode? I am
asking this because that demo only demonstrated clicking and
unclicking checkboxes, not saving your options?

4. Can't HttpURLConnection be used within Android? Should we use only
the android.net package and the RequestQueue class? The RequestQueue
class is not fetching full data for me, while the
HttpURLConnection .getInputStream() is throwing
IllegalArgumentException (I have checked connection is not null). Why
the latter problem is happening? Are there any alternatives for
accessing Network and retrieving data?

5. Why is the "CREATE TABLE IF NOT EXISTS" failing at the NOT keyword
in mc5 only (not in mc3)? Which SQLite version is used in mc5? Can
someone give an example on how to use the new query method (how to map
query elements to the query method arguments)? It was returning an
empty cursor even when a previous run of the application verified that
insert into same table was successful.

Thanks and regards,
TVP
--~--~---------~--~----~------------~-------~--~----~

2. anddev.org - Android Shirts Available

Hey guys,

want an anddev.org-Android Shirt?
Get one here: 
http://www.anddev.org/anddevorg_-_android_shirts_available-t1535.html

Regards, plusminus
http://anddev.org
#  Worlds largest Android Development Community / Tutorials
--~--~---------~--~----~------------~-------~--~----~

3. Iam a fresher to Andriod

4. select dropdown menu

5. Layout_Weight wierdness with ListView and Buttons (within vertical orientation LinearLayout)

6. Background color quirks when sizing EditText to small px heights

7. When our widgets fill the screen, how do we set autoscrolling?