Sunday, February 9, 2014

Questions about data storage


            
Android looked at several ways to store data
Internal storage, external storage, database, network mode there is a baffling SharedPrefrences
If I want to practice how to achieve the following?

1.data.xml in the package, not necessarily in the asset / or res / raw folder, on / below okay? How to access?
2 how to install xml file within the package to the system folder or external storage, but make sure it is writable (ROOT privileges in addition to using third-party software to get outside this method). For example, there is a / data package / data.xml installed into the system / data / data / package name / Now, rather than trying to write these documents through the program code?
3 For example, if I write a program, in addition to XML files and databases such, there is no other more mature approach to initialization and configuration information stored? It is better to encrypt (PS I am not familiar with encryption, write your own unrealistic).
Reply:
Urge Montana gets advice, post a few links are also considered, I find a lot of hand there is no ready-made books. Trouble doing it, even recommended a few books can be considered.
Reply:
General store are placed under the default installation directory.
Context.openOutputStream () is written on the package automatically route down.

There is on the sdcard, the system needs to take the initiative to open when written sdcard, generally less recommended, sometimes sdcard easily be mounted or not. It is recommended that the system writes to the default installation package below.

If you want to write an encrypted configuration file, their own custom data format and then written to the file encryption. It is quite safe.
Or the configuration information on the server side.
Reply:
APK installer, how to copy data files to the data / data file? Must be achieved by writing code for it?
Can be placed inside the package by installing a file folder is automatically copied?

No comments:

Post a Comment