hello kerlw, just a idea from my side :
Why not write you config file to /data/data/package-name/ when your programm starts the first time. And later when your app starts it checks, whether their is already a version of this file. This would mean, that don't have to install the config file seperatly. Does this fit into your requirements ? Good Luck ! Frank On 21 Apr., 12:21, Ke Wu <[email protected]> wrote: > Hi all > As you know, an app often has some configurations, I need to save these > configurations into a file, and in my app I could change these > configurations. In other words, I need a file to take all my config data, > and in my app, I could read/write this file as I want. > > I've searched document and mailing list archive, and have not found the > exact solution. > 1. SharedPreferences could not solve : It could only do with simple > key/value pairs, my configuration data is more complex . > 2. file in /assets , /res/raw could not solve: It seems that the file in > these position would be read only > > I've found a way, it almost solved my problem, but still not. > Our code could deal with the file in /data/data/package-name/files on the > target file system, this is good to me, but how could I put my file in this > directory after my app has been installed? My app need to read these > configurations when it starts. > > So, my question is how could I pack my data file into my apk package, and > then my app could read/write this file when it is run. > > Thanks in advance. > > kerlw > > -- > 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 > athttp://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

