Monday, June 7, 2010

[android-developers] Re: Free and paid version share same data

You could read data from the free app's data dir if they both have the
same android:sharedUserId and are signed with the same key using
Context#createPackageContext(). The downside to this since you already
published your app in the market, when you upgrade the free app with
the newly added sharedUserId in the manifest, it's uid on the device
will change causing it's data dir to be inaccessible.

A possible workaround is to have a (disabled) content provider in the
free app and check on load if the paid app is installed. If it is,
enable the content provider using PackageManager and use that to
import data into the paid app.

andreas wrote:
> I have a free app in the market and use the data directory of the app
> to store some files. Now I think about offering a paid (donate)
> version of the app, so that people who want to pay a few pennys will
> be able to do so.
>
> But AFAIK the new (paid) app needs a new name, so I won't be able to
> use the stored data of the free version. That means, that existing
> users would have to re-enter a lot of personal settings - which
> probably would be a no-no for a lot of users.
>
> So my question: Is there a smart way to have a free and a paid version
> in the market, where the later installed payed version can use the
> data of the free version?
>
> I thought about using the SD-card for data storage, but there might be
> devices without any SD-card...
>
> Andreas

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment