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?
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With