在应用程序内结算。如何存储信息的用户已支付? [英] In-app billing. How to store information that user has paid?
问题描述
有一个类似主题<一href="http://stackoverflow.com/questions/9462641/how-to-check-my-in-app-billing-product-is-already-purchased-in-app-by-user">here
好。我们可以了解用户的使用购买RESTORE_TRANSACTIONS要求谷歌播放。 但。这是写在文档 你应该用只有当你的应用程序安装在第一次上的设备,或者您的应用程序已经从设备删除并重新安装RESTORE_TRANSACTIONS请求类型。 为什么不经过每次启动? 它看起来舒服,可以查询谷歌播放每次应用程序启动时。
Okay. We can find out about user's purchase using RESTORE_TRANSACTIONS request to Google Play. But. It is written in documentation that " You should use the RESTORE_TRANSACTIONS request type only when your application is installed for the first time on a device or when your application has been removed from a device and reinstalled." Why not after every start? It looks comfortable and possible to query Google Play every time when the app starts.
Otherewise
Otherewise
1)我应该保存我的Web服务器上有关付款信息
1) I should store information about payment on my WEB server
2),或者我应该保存该信息到SD卡。该记录应是安全的,包括 设备ID,这样在其它设备上的复制将无法正常工作
2) Or I should save this info to sdcard. The record should be secure, including device ID, so that copy on another device will not work
所以。哪种方法更好呢? 谢谢你。
So. Which way is better? Thanks.
推荐答案
我建议:
3)使用在应用程序Shared- preferences类或SQLite数据库
3) Use the in-app Shared-Preferences Class or SQLite Database
(查看本页面: http://developer.android.com /guide/topics/data/data-storage.html )
加密是一件好事,但这样的数据是这样说来连接到您的应用程序,通常不会被其他应用程序进行访问。
Encryption is always good, but this way the data is so to say attached to your application and can usually not be accessed by other apps.
这篇关于在应用程序内结算。如何存储信息的用户已支付?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!