[android-developers] Re: What's the proper way to share data between lite and pro versions of the same app?

2009-04-27 Thread jarkman
I don't know if this is the *proper* way, exactly. We copy the SQL data, with the Pro using the provider in the Lite to read the data across and upgrade it. And, we've built a cheap little scheme using broadcast intents to allow the Pro to request the SharedPreferences from the Lite. Hope that

[android-developers] Re: What's the proper way to share data between lite and pro versions of the same app?

2009-04-27 Thread MrSnowflake
Iirc you can make the 2 version of the app use the same userId on the phone, that way you have full access to the lite data from the pro application. On 27 apr, 10:56, jarkman jark...@gmail.com wrote: I don't know if this is the *proper* way, exactly. We copy the SQL data, with the Pro using

[android-developers] Re: What's the proper way to share data between lite and pro versions of the same app?

2009-04-27 Thread Just Checking
I tried that, and it didn't seem to work. In both manifests, I specified: android:sharedUserId=org.mydomain.projectname But no luck. From the documentation, I think the only thing it does is make the two processes run under the same user ID, but you still have to do something else to make one

[android-developers] Re: What's the proper way to share data between lite and pro versions of the same app?

2009-04-27 Thread Michael MacDonald
You have to specify the full path when opening the SQL database, instead of using the helper that derives it from the context. Just Checking wrote: I tried that, and it didn't seem to work. In both manifests, I specified: android:sharedUserId=org.mydomain.projectname But no luck. From the

[android-developers] Re: What's the proper way to share data between lite and pro versions of the same app?

2009-04-27 Thread Dianne Hackborn
Don't specify the full path, just use Context.createPackageContext() to create a Context for the other package, and then use the data access APIs from there. Absolute paths: bad bad bad. On Mon, Apr 27, 2009 at 8:43 AM, Michael MacDonald googlec...@antlersoft.com wrote: You have to specify

[android-developers] Re: What's the proper way to share data between lite and pro versions of the same app?

2009-04-27 Thread Just Checking
Dianne, Thank you. That worked like a charm. The first time the app runs - onCreating the database - I try to get a context from the other version, and if it exists I basically copy all the databasebase tables. The same context gets me the other version's shared preferences.