Android Subscription And Payment

怎甘沉沦 提交于 2019-12-07 18:03:00

问题


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.


回答1:


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)




回答2:


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.



来源:https://stackoverflow.com/questions/7793451/android-subscription-and-payment

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!