在应用程序计费中进行测试
我将我签名的应用程序上传到Android市场,我制作了一些已发布的应用程序内容(但不是应用程序)。 现在我尝试在真实设备上购买自己的产品:我是否需要使用我上传到市场的相同签名的 .apk 进行测试?或者是我可以使用 Eclipse 启动的“普通”版本?
因为当我使用 Eclipse 启动应用程序并发送 requestPurchase() 时,弹出窗口告诉我该应用程序版本尚未准备好进行市场购买...
您无需发布应用程序即可使用真实产品 ID 执行端到端测试;您只需将您的申请作为草稿上传即可。但是,您必须先使用发布密钥对您的应用程序进行签名,然后才能将其作为草稿应用程序上传。此外,上传的应用程序的版本号必须与您加载到设备进行测试的应用程序的版本号相匹配。
正如谷歌文档中所写,市场上应用程序的版本号和设备上应用程序的版本号是相同的:/
I uploaded my signed app to the android market, I made some in app contents that I've published (but not the app).
Now I trying to purchase my own products on a real device: do I need to test with the same signed .apk I uploaded to the market? Or a "normal" one I can launch with Eclipse?
Cause when I launch my app with Eclipse and send a requestPurchase(), a pop up tells me that this app version is not ready for market purchase...
You do not need to publish your application to perform end-to-end testing with real product IDs; you only need to upload your application as a draft application. However, you must sign your application with your release key before you upload it as a draft application. Also, the version number of the uploaded application must match the version number of the application you load to your device for testing.
And as it's write on google's doc, the version number of the app on the market and of the app on the device are the same :/
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要使用已签名的 APK,与您上传到应用市场的 APK 相同。
您还需要使用与开发者帐户不同的 Gmail 帐户才能访问市场。
这里有一个很好的教程:简单的应用内计费< /a> 以及一些替代解释
测试开发人员指南非常详尽:静态测试计费
You need to use a signed APK, the same one you uploaded to the app market.
You also need to use a different gmail account to your developer account to access the market.
There's a good tutorial here: Simple In App Billing with some alternative explanations
The testing developer guide is pretty thorough: Testing Billing Statically
您只需对 apk 进行签名(在 Eclipse 中:Android 工具 -> 导出签名的应用程序包...)并将其重新安装到设备上(将设备连接到 USB:adb install _YOUR_APK_)。
还有一种方法可以在投入真金白银之前使用您自己的产品在模拟器上测试您的应用程序:android 测试计费 库。
该库是模拟器的应用内计费实现,已在应用程序 Horer horaires de RER 中进行了测试。
You just need to sign the apk (in Eclipse : Android Tools -> Export Signed Application Package...) and reinstall it on the device (with the device attached to USB : adb install _YOUR_APK_).
There's also a way to test your app on the emulator with your own products before going to the real money : android test billing library.
This library is the In-App billing implementation for the emulator, which was tested in the application Horer horaires de RER.