简体   繁体   中英

Merging a paid Android app with the free version

I have an Android app that comes in two versions: a free one and a premium one with more features that costs $0.99.

I'd like to move to an In App Purchase approach where the premium features can be bought in the Free version. However, I obviously don't want to upset my users who have already bought the paid app.

Is there any proven way to merge separate freemium apps into one?

Right now, I'm considering a solution I came up with which would have the free version automatically unlock its paid features if it detects that the paid version of the app is installed on the device. I was thinking of using interprocess communication between the apps. However I'm not experienced in IPC, especially on Android and I'm not sure if it even applies here or is particularly robust.

However, I obviously don't want to upset my users who have already bought the paid app.

Unless you are charging less for the IAP than for the paid app to get the same features, I'm not sure how this would lead to any user complaints. Whether they paid up front or later, if it's the same price it shouldn't matter.

I'm considering a solution I came up with which would have the free version automatically unlock its paid features if it detects that the paid version of the app is installed on the device.

This can be done pretty easily just by querying PackageManager to see if the other app is installed. Something like:

try {
    PackageInfo info = getPackageManager().getPackageInfo("com.example.paidapp", 0);

    //If we got here, the paid app is installed.
    // You can even check metadata, like which version they have
    int installedVersion = info.versionCode;
} catch (PackageManager.NameNotFoundException e) {
    //Paid app is not installed!
}

Some apps have done this for various reasons, using the "paid" package as a key into the free application, so it's not without precedent.

The only IPC you might need to get involved in would be if you want to somehow read some saved data out of the paid app into the free app. In this case, I would suggest implementing a ContentProvider to expose the data elements you need to the other application. I would also protect that provider with a signature permission, so that only your applications can access it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM