views:

2287

answers:

4

It looks like Android won't natively support in-app purchases for a while, and when it does there might be a huge user base with devices that don't support them.

What's the best way to implement iPhone-like (additional content or services) in-app purchases in Android using the Android Market if possible?

The solution should consider in particular:

  • For all kinds of in-app purchases: Android Market's 24-hour cancellation policy
  • For consumables/non-consumables: storage of additional content (ie: use precious application memory to avoid piracy, or use SD card to avoid bloating application memory)

Thanks!

+3  A: 

You say that Android Market doesn't support in-app purchases, and then ask how you can implement in-app purchases using Android Market?(!)

Anyway, if and when they do support it, I imagine it could be distributed as an update to the Android Market application itself, so most users would be able to use the functionality. I believe the Market app updates itself automatically.

Possibly the Market would accept an Intent to trigger a payment via the usual on-device mechanism and return your app (or more likely your server) a callback.

Christopher
I said the Android Market doesn't support in-app purchases NATIVELY. That doesn't mean there isn't a way to implement something similar. Hence the question.
hgpc
I'm sure there is a way to implement something similar outwith the Market, but I still don't get the "using the Android Market" part and how its cancellation policy could come into it if they neither support in-app purchases, add-ons or anything like that.
Christopher
See Alex Volovoy's answer.
hgpc
I see what you mean, but the approach mentioned above is not an in-app purchase -- it's completely out of the app! :) Anyway, the Market definitely has much to improve on.
Christopher
+1 on Market improvements. Let just hope it's not going to be all about phones and some time will be allocated to improve market.
Alex Volovoy
+3  A: 

You can create a premium key application, that will have a key. How you expose that it's your deal ( or you can just check if PremiumKey activity exist ). From the main app you just check for your key and if it's exist enable premium option ) If you're talking about buying OTHER apps from yours - build your list with market url pointed to the other apps ( market:// )

Alex Volovoy
Thanks for answering, Alex. No, not talking about buying other apps from inside an app. Talking about buying either consumables, non-consumables, unlocking features or subscriptions. How would you deal with the 24-hour cancellation policy? Or are you suggesting to ask the user to keep the "key" app installed forever?
hgpc
Key is just another application. You add DRM protection while publish ( still can be cracked ). Your main app will check for key at startup to unlock features. If user returns key application - it's not going to be longer there and your main app won't be able to get the the key at the startup and premium features will be disabled. Search market for premium key - many shops do that.
Alex Volovoy
And yes key have to be installed forever as long as you want premium features - you just hide it from the drawer so user won't be able click on it.
Alex Volovoy
Thanks Alex. Do you think your solution would work well with the other type of in-app purchases: additional/downloadable content (consumables and non-consumables)?
hgpc
Alex Volovoy
An example of non-consumable: additional levels of a game where each level is a different item. This is very common in iPhone development. More info: http://developer.apple.com/iphone/program/sdk/inapppurchase.html. Your solution seems very oriented just to unlock features, not to distribute additional content. But it might work with some further considerations about storage of the content if it's downloable.
hgpc
For something like paying for an extra game level, you could implement an application with a single `Activity` that responds to a specific `Intent` like `com.example.mygame.LEVEL_5`. As Alex mentions, hide this from showing up in the regular application list. If the base game app detects that `Intent` can't be resolved, prompt the user to buy it from the Market. If it can be resolved, just launch that `Intent`. However, as you mention, the user can then get a refund as the extra level is packaged and sold the same as any other app in the Market.
Christopher
You would also have to be wary of customers buying individual levels without the base app and then being confused and leaving bad reviews, as you can see for some other add-ons available in the Market.
Christopher
Thanks Christopher. Now we're talking. :) Yes, these are all issues a solution should take into account. It isn't a simple question. ;)
hgpc
+3  A: 

It is against the Android Market Developer Distribution Agreement to take in-app payment:

3.3 ... All fees received by Developers for Products distributed via the Market must be processed by the Market’s Payment Processor.

Draemon
No, it isn't. The DA tells says that you can't use other Payment Processors from inside an app distributed through the Android Market. You can always distribute your app outside the Market, or use the Market to sell keys or premium versions.
hgpc
The OP heavily implies using the market to distribute the app, but doing in-app purchases. Since these are impossible through the market they must violate the DA. I'll clarify my answer nevertheless.
Draemon
See Alex Volovoy's answer. For example, there are ways to unlock features by selling a "key" through the Android Market. I believe this is admitted by the DA. In any case, not using the Android Market is also an option, and this doesn't violate the DA.
hgpc
+2  A: 

Looks like Paypal has launched a library for accepting in-app payments. See here. Not sure if this system violates the T&C though.

Samik R.
nope its wont allow to purchase soft good.
Rajnikant