Hello,
I've been experimenting with an application that reads a text file containing a dictionary of words. When I sign and publish this app, I want to include the text file in the package. At the moment, I keep the text file in /data/app-private directory. On the emulator, I test this by first copying the text file to this directory using eclipse's DDMS perspective, and it works.
When I try to do the same on the G1 phone, I cannot copy the text file to the /data/app-private directory. Browsing the G1's file system using eclipse, I notice that there is a /data directory, but is empty. It seems that this is a read-only file system.
When preparing the package to install on the phone, how do I specify that the text file is also a part of the package?
If the text file is part of the package, how do I specify its location? At the moment, my code is something like this:
Can someone help?Code:String fileName = "file.txt"; String dirName = "/data/app-private"; File filePath = new File( dirName, fileName); BufferedReader input = new BufferedReader(new FileReader(aFileName));
Paul
Bookmarks