Testing Android IAP/In-App Purchase Subscriptions(测试 Android IAP/应用内购买订阅)
问题描述
我正在实施几个要在 Google Play 上启动的 Android 应用程序,它们都使用 Google IAP 自动续订订阅产品类型进行订阅.
I am implementing several Android applications to be launched on Google Play and they all have subscriptions using the Google IAP auto-renewing subscription product type.
为了测试应用,我做了以下操作:
To test the app I have done the following:
已将草稿二进制文件上传到 Google Play,但未发布.
Uploaded a draft binary to Google Play but not published it.
在开发者控制台中创建并发布了订阅产品.
Created and published the Subscription product in the developer console.
将我的 Google 帐户添加到开发者控制台的测试帐户列表中
Added my Google account to the list of test accounts in the developer console
从 Eclipse 导出我的 APK(与上传到 Google Play 的包名称和版本名称/代码相同)
Exported my APK from eclipse (with the same package name and version name/code as the one uploaded to Google Play)
在我使用测试帐户登录的测试设备上安装了这个导出的 APK.
Installed this exported APK on my test device which is logged in with the test account.
我现在能够成功测试我的购买并且一切正常.但是,据我所知,这次购买是真实的,而且订阅的有效期实际上是整整一个月.
I am now able to successfully test my purchase and every thing works. However, as far as I can see, this purchase is real and the subscription is actually valid for an entire month.
有没有办法进行任何类型的沙盒"测试,或者至少有办法提前取消此订阅?
Is there no way to do any kind of "sandbox" testing or at least a way to prematurely cancel this subscription?
如何测试我的订阅已过期而无需等待一个月的场景?!
How can I test the scenario where my subscription has expired without having to wait a month?!
非常感谢任何帮助!
推荐答案
不适用于订阅.新的 (v3) 应用内计费 API 已发布,但目前不支持订阅.当它发生时,它可能会带来一种更简单的测试方法(尽管似乎不太可能).完成测试后,您只需在商家控制台中取消订阅/购买即可.
Not for subscriptions. The new (v3) in-app billing API has been released, but it currently does not support subscriptions. When it does, it might bring an easier way to test (seems unlikely though). You just have to cancel subscriptions/purchases in the merchant console when you are done testing.
这篇关于测试 Android IAP/应用内购买订阅的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:测试 Android IAP/应用内购买订阅
基础教程推荐
- 如何让对象对 Cocos2D 中的触摸做出反应? 2022-01-01
- 在 gmail 中为 ios 应用程序检索朋友的朋友 2022-01-01
- android 应用程序已发布,但在 google play 中找不到 2022-01-01
- UIWebView 委托方法 shouldStartLoadWithRequest:在 WKWebView 中等效? 2022-01-01
- 当从同一个组件调用时,两个 IBAction 触发的顺序是什么? 2022-01-01
- 如何在没有IB的情况下将2个按钮添加到右侧的UINavigationbar? 2022-01-01
- Kivy Buildozer 无法构建 apk,命令失败:./distribute.sh -m “kivy"d 2022-01-01
- 如何在 iPhone 上显示来自 API 的 HTML 文本? 2022-01-01
- Android:对话框关闭而不调用关闭 2022-01-01
- 如何在 UIImageView 中异步加载图像? 2022-01-01