First of all I have done a search and can’t find a specific answer to my question so here goes…
I am writing my first Android application and plan to have a Lite version (limited features) and a paid version (full features).
The Lite and Pro version will use the same SQLite database structure, and if the user starts with the Lite version and upgrades to the Pro version, I dont want them to lose the data they have created in the Lite version.
As the Lite and Pro versions will (from my understanding) have to be in separate packages to allow the Android Market to distinguish between them, how can the Pro version see the Lite database?
Many thanks in advance for your answers.
What I did in and it seems to work for Hexaddicus, is have both Lite and Pro versions run as the same user and then on the first time run of the Pro version, copy the Lite database over. Then inform the user of the copy.
Set the
android:sharedUserIdto be the same in both products…And then the code to copy the DB…
The only downside of this is that once the copy is done, there is no syncing between the two versions. You also have to make sure that the user of the Lite version is running a version that is running as the
sharedUserIdor the copy will fail.Update: please consider ChrisCashwells comments and answer too since he brings up a valid point and I can’t remember what I did in his example.