In-app billing. How to store information that user has paid?(应用内结算.如何存储用户已支付的信息?)
问题描述
有一个类似的主题 这里
好的.我们可以通过对 Google Play 的 RESTORE_TRANSACTIONS 请求了解用户的购买情况.但.它写在文档中" 仅当您的应用程序首次安装在设备上或您的应用程序已从设备中删除并重新安装时,您才应使用 RESTORE_TRANSACTIONS 请求类型."为什么不是每次开始后?每次应用启动时都可以查询 Google Play,看起来很舒服.
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.
否则
1) 我应该在我的 WEB 服务器上存储有关付款的信息
1) I should store information about payment on my WEB server
2) 或者我应该将此信息保存到 sdcard.记录应该是安全的,包括设备 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.
这篇关于应用内结算.如何存储用户已支付的信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:应用内结算.如何存储用户已支付的信息?


基础教程推荐
- 如何在没有IB的情况下将2个按钮添加到右侧的UINavigationbar? 2022-01-01
- 如何在 iPhone 上显示来自 API 的 HTML 文本? 2022-01-01
- 如何在 UIImageView 中异步加载图像? 2022-01-01
- 在 gmail 中为 ios 应用程序检索朋友的朋友 2022-01-01
- 如何让对象对 Cocos2D 中的触摸做出反应? 2022-01-01
- Kivy Buildozer 无法构建 apk,命令失败:./distribute.sh -m “kivy"d 2022-01-01
- android 应用程序已发布,但在 google play 中找不到 2022-01-01
- UIWebView 委托方法 shouldStartLoadWithRequest:在 WKWebView 中等效? 2022-01-01
- 当从同一个组件调用时,两个 IBAction 触发的顺序是什么? 2022-01-01
- Android:对话框关闭而不调用关闭 2022-01-01