1

Some free applications can often be upgraded to paid premium versions. Is there a known packaging pattern so that the paid app replaces the free apps, and therefore gets all data the free may have stored ?

I understand that since app is identified by its unique fully qualified name this is impossible for an app to see data from another, but I kinda recall already seeing this. Or does it mean that I have to consider the two apps as completely distinct, and foresee an export/import feature mechanism ?

(this question is not related to the actual development of those two flavours, which can be achieved in many ways, but rather to the way app should be packaged)

Gonzoide
  • 45
  • 1
  • 5

1 Answers1

0

Is there a known packaging pattern so that the paid app replaces the free apps, and therefore gets all data the free may have stored ?

No, the package names must be unique. Thus, one app does not "replace" another app and gets its data.

Or does it mean that I have to consider the two apps as completely distinct, and foresee an export/import feature mechanism ?

Yes, two apps are distinct. However, they can still exchange data.

These are common methods:

  1. Publish one (free) app which contains all functionality but only has the free functionality enabled by default. Publish an additional (paid) app which serves as an unlocker. Your free app can check if the unlocker is installed and enabled the paid functionality accordingly. It is recommended to check the package signature of the unlocker app, e.g., as described in the answers here.
  2. Similar to above but use in-app purchases in the free app instead of an additional unlocker app.
  3. Publish both a free and paid app as self-contained apps. You can implement a ContentProvider to transfer data from the free to the paid app. Of course you can implement other export/import methods as well. However, using a ContentProvider with permissions makes it easy to automatically and securely copy the data, e.g., when the paid app is started for the first time.
Community
  • 1
  • 1
cygery
  • 2,309
  • 3
  • 18
  • 25
  • Thanks for your quick and detailed answer, I think I'll go with solution 1, as (for the time being) the only difference I foresee between free and premium is to get rid of ads :) – Gonzoide Nov 03 '14 at 12:41