[android-developers] Re: How to share a database between a free and paid version of an application

2009-10-28 Thread skyhigh
I finally figured out how to copy the database from my free application to the paid application. After rebuilding numerous times and testing many different combinations I discovered the following: 1) It doesn't matter if I use the debug signing key or my release signing key, as long as both the

[android-developers] Re: How to share a database between a free and paid version of an application

2009-10-27 Thread RichardC
It would be nice if the Android Market Place allowed us to have dependent applications. I could then put my shared data into a seperate content provider application. Then on the Market (or even better in my manifest) I could do: My-paid-app depends on my-content-provider-app My-free-app depends

[android-developers] Re: How to share a database between a free and paid version of an application

2009-10-27 Thread skyhigh
On Oct 27, 4:33 am, RichardC wrote: > Use the paid-for app unlocks the free-app approach then you don't need > to share thedatabase. Richard I read the discussion on another topic in this forum at http://groups.google.com/group/android-developers/browse_thread/thread/f032b5aa7a733a3d/c49878d109b

[android-developers] Re: How to share a database between a free and paid version of an application

2009-10-27 Thread RichardC
Use the paid-for app unlocks the free-app approach then you don't need to share the database. In the free just test for the presence of your paid-for unlock app. If you find it run with full functionality, if you don't then run just with the restricted functionality of the free- app. This make

[android-developers] Re: How to share a database between a free and paid version of an application

2009-10-27 Thread skyhigh
I am to the point in developing my paid application version where I need to implement the support for copying the database. I found that using CONTEXT_IGNORE_SECURITY gets me past the call to createPackageContext without a SecurityException, but it does not allow me to access the database files f

[android-developers] Re: How to share a database between a free and paid version of an application

2009-10-27 Thread skyhigh
I am to the point in developing my paid application version where I need to implement the support for copying the database. I found that using CONTEXT_IGNORE_SECURITY gets me past the call to createPackageContext without a SecurityException, but it does not allow me to access the database files f

[android-developers] Re: How to share a database between a free and paid version of an application

2009-10-13 Thread Dianne Hackborn
On Mon, Oct 12, 2009 at 9:22 AM, skyhigh wrote: > After doing some more testing I have found that using a shared user ID > is not needed to access the other package's databases. > > If you call Context.createPackageContext(, > Context.CONTEXT_IGNORE_SECURITY) then you can access the other > packa

[android-developers] Re: How to share a database between a free and paid version of an application

2009-10-13 Thread RichardC
Another sugguestion is to "unlock" your free app with an unlock-app. You then don't have to do any data migration, have a read of: http://groups.google.com/group/android-beginners/browse_thread/thread/7d5698ab66aadd62# (especially post 4 by Justin Anderson) Your free application has all the fun

[android-developers] Re: How to share a database between a free and paid version of an application

2009-10-13 Thread Skeniver
I have managed to connect to the 'lite' database with the following code: Context other = cont.createPackageContext("com.skeniver.applite", Context.CONTEXT_IGNORE_SECURITY); DBAdapter odb = new DBAdapter(other); String[] dbs = cont.databaseList(); and by adding the SharedUserID in the manifest (

[android-developers] Re: How to share a database between a free and paid version of an application

2009-10-12 Thread skyhigh
After doing some more testing I have found that using a shared user ID is not needed to access the other package's databases. If you call Context.createPackageContext(, Context.CONTEXT_IGNORE_SECURITY) then you can access the other package's databases even if there is no shared user ID, as long a

[android-developers] Re: How to share a database between a free and paid version of an application

2009-10-03 Thread skyhigh
In searching for more information on this topic I found the following code sample which apparently is needed to access the data and resources of another package. Context currentCtx = ...; Context otherCtx = currentCtx.createPackageContext(, Context.CONTENT_INCLUDE_CODE); Resources otherRes = othe

[android-developers] Re: How to share a database between a free and paid version of an application

2009-10-03 Thread skyhigh
In searching for more information on this topic I found the following code sample which apparently is needed to access the data and resources of another package. Context currentCtx = ...; Context otherCtx = currentCtx.createPackageContext(, Context.CONTENT_INCLUDE_CODE); Resources otherRes = othe

[android-developers] Re: How to share a database between a free and paid version of an application

2009-10-02 Thread Mark Murphy
> I would greatly appreciate any input from others that have dealt with > this issue, regarding the best way to make sure that users upgrading > to a paid version won't lose all the data they put into the free > version of the application. Here is one possible strategy: Step #1: Do the shared us