How to enable backup and restore for Symbian OS applications
Applications will not be backed up by default in S60 3rd Edition. Enabling backup will make your application more user-friendly: a user which do a backup of this phone (ok, those one are probably a minority...) expects that all its application are backed up, not all application but yours. So, let's try to make the user happy. In most of the case , this is quite easy....
Another good reason to make your application aware of backup is that this is a Symbian Signed requirement. This is not a mandatory one but if your application is not backup aware, you will have to notify the Test House or they may consider that backup has failed. Once again, in most of the case, supporting backup is ridiculously simple.
Basic application backup
The following represent the minimum you have to do for the backup of your application (this means: executable and resource files, no data file will be backed up):
write a backup_registration.xml file as shown below
Another good reason to make your application aware of backup is that this is a Symbian Signed requirement. This is not a mandatory one but if your application is not backup aware, you will have to notify the Test House or they may consider that backup has failed. Once again, in most of the case, supporting backup is ridiculously simple.
Basic application backup
The following represent the minimum you have to do for the backup of your application (this means: executable and resource files, no data file will be backed up):
write a backup_registration.xml file as shown below
add it into your pkg file:
"backup_registration.xml"-"!:\private\\backup_registration.xml"
Adding private data into the backup
Another common requirement would be to save the content of your private directory (located in \private\). This is done by adding the following declaration in your backup_registration.xml file (inside the tags):
You can also decide to save all your private directory but a 'nobackup' subdirectory:
You may also prefer to specify files instead of directories:
Adding public data into the backup
In the paragraph above, the "\" directory is referring to your application private directory. So how to save data when they are located outside of your private area ? This is done by simply using another xml tag. Replaceby and the path will be relative to the root directory of the phone file system (you don't need to specify the drive):
Known Bugs
Unfortunately, several bugs affects the Backup and Restore feature. Some of these includes:
data located in C:\System cannot be backed-up: no work-around except put your data in another location....
Backup and restore fails for applications using a developer certificate. That one is just terrible: you can test backup and restore for application only when they are signed with a self- generated certificate or once they are Symbian Signed. If you use developer certificate, which is not so extravagant, no luck: your application will be backed-up correctly but restore will always fail.
I have stopped counting how many hours I have lost before finding out this second issue! And will you believe it, I just spent half of my afternoon trying to backup an application signed with a developer certificate which had its data under c:\system.... Sometimes I hate this operating system!
"backup_registration.xml"-"!:\private\
Adding private data into the backup
Another common requirement would be to save the content of your private directory (located in \private\
You can also decide to save all your private directory but a 'nobackup' subdirectory:
In the paragraph above, the "\" directory is referring to your application private directory. So how to save data when they are located outside of your private area ? This is done by simply using another xml tag. Replace
Known Bugs
Unfortunately, several bugs affects the Backup and Restore feature. Some of these includes:
data located in C:\System cannot be backed-up: no work-around except put your data in another location....
Backup and restore fails for applications using a developer certificate. That one is just terrible: you can test backup and restore for application only when they are signed with a self- generated certificate or once they are Symbian Signed. If you use developer certificate, which is not so extravagant, no luck: your application will be backed-up correctly but restore will always fail.
I have stopped counting how many hours I have lost before finding out this second issue! And will you believe it, I just spent half of my afternoon trying to backup an application signed with a developer certificate which had its data under c:\system.... Sometimes I hate this operating system!
No comments:
Post a Comment