Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing paid Android App to free with In App Billing - grandfathering existing customers

I have a paid app in Google Play today, that I want to change to a free app with 3 In-App purchases. The problem is of cause how to "give" the In-App purchase to existing customers, taht already paid for the app.

I just had a thought - can licensing do the trick?

The existing paid app uses Google licensing, but that shouldn't be necessary any more when all features are bought as In-App purchases - right? So all existing customers have a license, while all new customers don't need one.

Would it be possible to check for license, and in case it's found grant the user access to the same features as the 3 In-App purchases will give access to?

like image 207
user1057831 Avatar asked Feb 28 '13 13:02

user1057831


2 Answers

As far as I know, there is no good way to give a user an in-app purchase for free when the purchase isn't already free (eg via a coupon).

There is a discussion on some possible ways to do this at How can I use the paid version of my app as a “key” to the free version?

One way to do this would be to have some code that checks for "legacy users" (those who have the old paid app installed), and set a preference on their device that flags them as having the paid app.

You will run into problems if the user switches phones or uninstalls then reinstalls your app. You could circumvent this by adding a second set of in-app products for legacy users that are free, but are only offered to uses who have the old app installed. After they buy the free legacy versions, they could uninstall the old app. Then whenever you check for the purchased products, you check for either the legacy or the new product.

like image 76
Bryan Herbst Avatar answered Nov 11 '22 14:11

Bryan Herbst


I think you can do something like this, to verify that the "pro" app is available and is signed by the same signature.

public boolean isProAppPresent()
{
    try
    {
        PackageInfo info = context.getPackageManager().getPackageInfo("x.x.x.pro",
                PackageManager.GET_META_DATA);
        Log.d(TAG, "Pro app is installed: " + info.applicationInfo.name);
        return context.getPackageManager().checkSignatures("x.x.x",
                "x.x.x.pro") == PackageManager.SIGNATURE_MATCH;
    }
    catch (NameNotFoundException e)
    {
        return false;
    }
}

It is easy to do, but I'm not sure if it is a complete protection.

like image 32
n0rm1e Avatar answered Nov 11 '22 15:11

n0rm1e