In the past, when creating a file in the "local directory", it put it under /data/data/<packagename>/files/ Example: /data/data/com.companyname.appname/files/test.txt
Also, SharedPreferences are persisted under "shared_prefs" subdirectory instead of "files". Example: /data/data/com.companyname.appname/shared_prefs/test.Name.xml Also, you can explore the file system's directory structure by using the DDMS GUI, or by using adb to get a UNIX shell into the emulator. Another option is the raw resource, as was mentioned above. Another option is the sdcard, but why store app data on external storage when you can store it locally? (Also, if you must access the sdcard from Java code, consider using android.os.Environment.getExternalStorageDirectory() instead of a hard- coded path.) -- PJ On Nov 5, 4:17 am, sangorys <[email protected]> wrote: > I have a similar question. I just want to add a .txt file in my > program. Where can I put it ? > > Thanks > > On 4 nov, 20:20, WoodManEXP <[email protected]> wrote: > > > > > /sdcard/ works well. > > > On Nov 2, 1:01 pm, Wojciech Topolski <[email protected]> > > wrote:> Hi > > > > I have a problem with files. I would like to add file with database > > > inserts > > > to my app. Where should I put this file? In res/then? This file will have > > > 5 > > > MB, so after operation I would like to remove it from system. I know about > > > /res/raw/file, but this file is only readably by InputStream importSql = > > > res.openRawResource(R.raw.import_sql); > > > > Best regards. > > > > -- > > > =============================== > > > Wojciech Topolski > > > [email protected] > > > =============================== -- 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

