3

In my application i want to implement Subscription service. Subscription will be mostly yearly. After subscription expiration application should ask for subscription renewal and go for payment and checkout process.

I checked for Android Licensing and in-app billing but i couldn't found any thing help full that i can use in my case as there i found that "Currently, Android Market doesn't support subscription billing. Please note that collecting payments through your application is not allowed under the Android Market Developer Distribution Agreement." on this link http://www.google.com/support/androidmarket/developer/bin/answer.py?hl=en&answer=140504.

How can i implement subscription and payment process in my application?

Please help me out.

Thank You.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
MaheshValu
  • 101
  • 2
  • 10

2 Answers2

2

I would do the following:

  • Sell the subscription through the in-app purchase. When the user actually purchase it, you bill them for the first year, and note down the purchase data on your datastore (local or on the server side).
  • Before the year ends, you alert the user to purchase the next year's "subscription", and do the same.

This has the disadvantage of making it very easy for the user to not pay the next year's fee, but who want's to be evil anyway.

An alternative would be to use the subscription through PayPal (http://techcrunch.com/2010/05/19/paypal-launches-in-app-payment-library-for-android/), but I have never used their service, and do not know its status w.r.t. Android Market's Terms. (see: https://stackoverflow.com/questions/2787738/paypal-as-in-app-payment-model-in-android)

Community
  • 1
  • 1
Guy
  • 12,250
  • 6
  • 53
  • 70
  • Thanks for replay but as i mentioned in my question that "collecting payments through your application is not allowed under the Android Market Developer Distribution Agreement". so do u think using paypal is good option? – MaheshValu Oct 17 '11 at 12:15
  • @MaheshValu Never tried implementing PayPal payments on android so I can't tell. Why not use In-App-purchase? – Guy Oct 17 '11 at 12:22
  • Have you worked with in-app billing? if yes can please provide me sample code? – MaheshValu Oct 17 '11 at 12:25
  • Yes. I have several applications that implement in-app-purchase. Google has a good tutorial here: http://developer.android.com/guide/market/billing/billing_integrate.html#billing-download which includes sample code which you can download to your machine, modify and distribute. – Guy Oct 17 '11 at 12:26
  • Suppose i have used android licensing and subscription of application is completed so android license will also be expired. My application will asks for renewal using in-app billing so is that possible to renew android license after in-app billing payment process? – MaheshValu Oct 17 '11 at 13:38
  • Hi Guy, i have one question, can i use other payment gateway like paypal etc instead of google checkout? like may be open their web link in webview and collect the payment? – Sunny Apr 15 '13 at 11:27
  • @Sunny I am not sure. Since this thread started, Google now supports subscriptions using their new and improved in-app purchase api. – Guy Apr 15 '13 at 11:37
  • @Guy Yes google now supports subscription, we have to integrate in-app billing using AIDL as mentioned in sample app, thanks for the reply, btw can we use some other payment gateway like paypal other than google checkout? – Sunny Apr 15 '13 at 14:07
1

Yes. I have several applications that implement in-app-purchase. Google has a good tutorial here: http://developer.android.com/guide/market/billing/billing_integrate.html#billing-download which includes sample code which you can download to your machine, modify and distribute.

Read their security section, as best practices also require obfuscation, and some general mangling of their sample code to help throw off automatic bots that try and strip off in-app-purchase code from the APK.

Also - I always keep all of the purchase related state in ObfuscatedPreferences (see: http://code.google.com/p/marketlicensing/source/browse/library/src/com/android/vending/licensing/PreferenceObfuscator.java?r=9cd599d6902d8b9b8311e4ef8dd20dcccb5e7aba) to make it a bit more difficult on cracking the app.

Guy
  • 12,250
  • 6
  • 53
  • 70