Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Going from paid to free w/in-app billing

I have an app on the market that costs $0.99. I want to implement in-app billing so that I can offer it for free with an option to unlock certain features for a price. I've already modified the code to allow that. Question is... how might I mark the 1000+ people who already purchased the app as having purchased it and unlock all the features?

like image 926
Roger Avatar asked Dec 28 '12 19:12

Roger


People also ask

What does free with in-app purchases mean?

In-app purchases allow developers to provide their applications for free. The developer then advertises upgrades to the paid version, paid feature unlocks, special items for sale, or even ads other apps and services to anyone who downloads the free version.

How do I know if an in-app purchase is free?

In the App Store, applications with in-app purchases will have a disclaimer next to the purchase button. If the app is initially free, this note should be beside the Get button. If it's paid, the disclaimer is beside the price tag.

How do I transfer in-app purchases between devices?

Provided you are logged in with the same app store account that made the purchase then you can re-download the app onto a new device.

How does Google Play billing work?

Google Play's billing system is a service that enables you to sell digital products and content in your Android app. You can use Google Play's billing system to sell a one-time product or subscriptions on a recurring basis.


1 Answers

You might be able to hack your way around this if you're using some sort of persistent storage.

For SharedPreferences, on the first run, do a check for one of your preferences using SharedPreferences.contains(). If it contains it, the app must have already been installed. If not, set another preference that marks the user as new(free), and set yet one more so it doesn't do the check every time.

That might only work if the preference doesn't have a "default" value, I'm not entirely sure if setting a default in xml will mark it as contained.

You could do something similar if you have any assets that get transferred to SD, or any similar one-time setup. Just check to see if it's already done before doing it the first time.

If you're using an SQLite DB, you could increment the DB version and mark as "paid" in onUpgrade() if coming from the current version(or earlier).

Like I said, it's a hack, but I don't know of any "official" way to check to see an app install is an upgrade or an initial install. There are some pitfalls here, though. For instance, if a previous paid customer completely uninstalls before installing the new version, or if it's on a new device...

like image 63
Geobits Avatar answered Oct 02 '22 22:10

Geobits