53

Edit: Android now supports in-app billing!

Original question:

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!

hpique
  • 119,096
  • 131
  • 338
  • 476

9 Answers9

35

This has changed as of today! There is now an example on the Android Developer site here: https://developer.android.com/google/play/billing/billing_overview

fernferret
  • 856
  • 2
  • 13
  • 26
11

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
  • 67,778
  • 13
  • 73
  • 54
  • 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? – hpique Jan 07 '10 at 20:01
  • 1
    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 Jan 07 '10 at 20:20
  • 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 Jan 07 '10 at 20:22
  • 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)? – hpique Jan 07 '10 at 20:24
  • consumables, non-consumables - you talking like a store to sell t-shirs or something ? I'm not sure if selling those things are under market t&c. Cause amazon apps selling products directly through amazon. However, because it not Market Item, you would have to deal with returns with whatever your store service is. – Alex Volovoy Jan 07 '10 at 20:30
  • 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. – hpique Jan 07 '10 at 20:40
  • 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 Orr Jan 07 '10 at 20:47
  • 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 Orr Jan 07 '10 at 20:48
  • Thanks Christopher. Now we're talking. :) Yes, these are all issues a solution should take into account. It isn't a simple question. ;) – hpique Jan 07 '10 at 20:56
7

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
  • 33,955
  • 16
  • 77
  • 104
  • 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. – hpique Jan 07 '10 at 20:17
  • 3
    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 Jan 07 '10 at 20:23
  • 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. – hpique Jan 07 '10 at 20:47
6

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
  • 1,636
  • 3
  • 15
  • 33
4

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 Orr
  • 110,418
  • 27
  • 198
  • 193
  • 1
    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. – hpique Jan 07 '10 at 19:57
  • 2
    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 Orr Jan 07 '10 at 20:27
  • 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 Orr Jan 07 '10 at 20:50
  • 1
    +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 Jan 07 '10 at 21:22
3

Here's another free licensing and payments system. The nice thing about this one is that it allows you to offer your app in any app store.

You can find more details @ http://www.cloud4apps.com/

Jaime Botero
  • 2,263
  • 2
  • 22
  • 14
3

There is also another in-app payment platform for Android applications called MoVend (www.movend.com). I have checked it out and there are several benefits using it compared to the other 2 mentioned earlier:

Many payment channels : Operator Billing for more than 38 countries, PayPal and virtual credits.

Many distribution channels: They work with developers to distribute their applications through the various distribution channels like Operator AppStores , OEMs and Android applications website. Marketing is something we all need. They are also invested by Singapore Telecommunications who has a strong presence in South East Asia.

They provide a sales analytics for you to track, trace and monitor the performance of your apps. Since they are available worldwide, you can always tailor your applications to the different geography area.

I am trying to build Android applications and monetizing is important.

Reply this thread so we can discuss how we can monetize our Android applications.

Alex
  • 31
  • 1
2

Check out http://mobpaynet.com, they are doing something like this. Not sure if it violates terms or not, but I will probably check it out.

dzdroid
  • 31
  • 2
0

For implementing in-app purchases in Air applications you may use third-party libs (Adobe AIR does not support In App Purchases for any platforms out of the box). For example, developed by Milkman Games (unfortunately, they are not free)

Denis Maslov
  • 446
  • 3
  • 7