On Wed, Aug 3, 2011 at 3:53 PM, Zsolt Vasvari <[email protected]> wrote:
> > For example, if the user moves to a phone with an older version of > Android, I can support that older version of the platform just fine, > but the user is Sh*t-out-of-Luck trying to move their database over > and they cannot open their newer SQLite database on an older version > of SQLite. What makes it even worse is that Cyogenmod uses a > substantially newer version of SQLite, so when the user upgrades their > crappy old phone to the shiny new model without Cyogenmod, they can no > longer access their data. You generally need to wipe the data partition when changing ROM's (especially downgrading), so that will delete the databases as well, no? Never had problems with Cyanogenmod actually. Plus once you go CM, you never go back :) > > This is not a theoratical problem, I've had to deal with this issue a > number of times. There is no solution other than: > > a) Package your own well-known SQLite version with your app. Is this > even possible? Since SQLDatabse and friends are part of the framework, I don't think you can get them to use a native binary you bundle. Unless you are willing to use your own DB classes, I don't think this is doable. > > b) Provide a custom data migration mechanism that exports your SQLite > data and then imports it. While this might be trivial for a small > app, it's a nighmare for an app like mine with a very complex > database. You could use the cloud backup thing. That should restore the data after users wipe and reinstalls. I have never used it and it doesn't work on pre-2.2 (IIRC), but it looks like your best shot. Still not trivial for a complex database though. > > Has anybody come across this problem and have any good ideas for > dealing with this? The only major trouble with SQLite I had is a buggy 2.3.3 version that tries to open a read-only database using WAL, which doesn't really work. What percent of your users downgrade firmware regularly? -- 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

