google-play - Google Play Product Id
问题描述
[Edited as suggested by @Nick. Also made clearer the problem I am having. Also done a further edit to explain further.]
In my app on the Google Play Dashboard I have created an in app purchase called test1. So what is the product id I put in the following?
String productString = "test1";
bp.purchase(this, /* "YOUR PRODUCT ID FROM GOOGLE PLAY CONSOLE HERE" */ productString);
The purchase
function is from Android In-App Billing v3 Library as noted by @Nick .
The error I am getting when I just have productString = "test1";
is it is saying:
Error
The item you requested is not available for purchase
When I do: bp.purchase(this, "com.mywebsite.jon.myappname.test1"); to make it look as much as possible like the test purchase example
I get the error from Google Play:
Error
Error while retreiving information fro server. [DF-AA-20]
I am not sure if this is important:
- I am at the very early stage of testing in Internal Testing (not Alpha or Beta testing).
- My developer account and my purchaser accounts are different
- I have the purchaser account email in my testers group
解决方案
此处的文档中描述了产品 ID 。这是:
“产品 ID - 您的产品的唯一、人类可读的 ID。产品 ID 在 Google Play 结算库中也称为 SKU。”
如果您将应用内购买称为“test1”,那么它就是“test1”。
- - - - 编辑
使用 3rd 方库(这是您链接到的库)而不是 Google 库的一个问题(或一件好事)是您没有获得官方文档。谷歌已经制作了一些关于应用计费测试的好文档。
我会完成该页面上的所有步骤,如果仍然无法正常工作,请说出您失败的步骤。我怀疑出了什么问题是您尚未将您的应用发布到 Play 商店。在购买真正的应用内产品之前(而不是像“android.test.purchased”这样的测试产品名称)必须发布应用。
如果您还不想向全世界发布您的应用程序,请不要担心。您可以使用内部测试轨道。除了您添加到其中的测试帐户外,任何人都看不到内部测试轨道发布。它不会影响您在新发布的应用程序排行榜等方面的排名。它专门用于测试购买或 Google Play 许可证验证等内容。
推荐阅读
- javascript - 如何使用 HTML 和 Javascript 在循环中自动播放页面加载?
- google-chrome - 为什么 Chrome 将 iframe 内的请求视为跨站点请求?
- javascript - 完全坚持如何在 HTML 中显示我的 JSON。编辑:我知道我想如何格式化它,除了原始 JSON,我无法让它输出任何东西
- javascript - 如何在页面重新加载时保持 JS 窗口在屏幕上
- c++ - 寻找对(假定的)MSVC 19.16 错误的洞察力
- java - java.util.concurrent.ForkJoinPool.common.parallelism 指导选择合适的并行度大小
- java - 登录spring集成java DSL
- react-native - TaskQueue:任务错误:未定义不是反应原生的对象(评估'_this.view._component.measureInWindow')
- android - 有没有可能在android中一次安装多个应用程序?
- python - 从两个文件中添加数字(逐行)