hi there,
is there any way we could keep the preference key data after an app update has performed or app reinstalled?
my answer is no, seem like it will reflash the whole app data automatically, is it correct?
thnx.
Wenz
hi there,
is there any way we could keep the preference key data after an app update has performed or app reinstalled?
my answer is no, seem like it will reflash the whole app data automatically, is it correct?
thnx.
Wenz
Yes you are correct, there is not feasible way to store the data locally over the update/reinstall.
Only way to do it woul be to send the data temporarely to some web server and then download it again after installation.
-Ilkka
In case you know some C++ you can write a servlet (an ECOM plugin) to the APIBridge that will read and write preferences to file when requested. Then you can call your servlet via APIBridge and pass it the preferences e.g. during widget exit and load them again on widget startup.
The downside is that in addition to your wgz-file, you also need to distribute the plugin dll. You cannot include it into wgz, it needs to be installed from a sis-package. To make it all install from a single package, follow the instructions for distributing APIBridge with your application and modify the resulting WgzInstaller pkg-file so that it will include your plugin dll and install it to c:/sys/bin . Self-signed certificate might not have enough capabilities for doing this, so you need to get a developer certificate for testing it on device and finally use the symbian signing service to distribute your app to others.
Read more about developing the APIBridge extension from APIBridge Plug-in API. There's an example plugin source code that you can modify for your needs, i.e. make it open a file and write/read the preferences. The code excerpts on the wiki page seemed a bit broken (wiki markup messed with the code) but i don't know if it's just my browser.
All this might be just an overkill for achieving persistent preferences, especially if you are not familiar with Symbian C++.