在应用程序内结算的测试:android.test.purchased已经拥有应用程序、测试、android、test

2023-09-13 02:28:18 作者:不好不坏不悲不喜

我目前正在测试应用内结算为未来的应用程序,我成功地购买后,测试项目android.test.purchased第一次,我现在收到的每一次回应code 7我尝试再次购买,这意味着我已经拥有这个项目。

I am currently testing In-App Billing for a future app, and after I succesfully "bought" the test item " android.test.purchased" the first time, I now receive the response code 7 every time i try to buy it again, which means that I already own this item.

12-15 23:02:14.149:E / IabHelper(19829):在应用内计费错误:无法   购买项目,错误响应:7:项目已经拥有

12-15 23:02:14.149: E/IabHelper(19829): In-app billing error: Unable to buy item, Error response: 7:Item Already Owned

据我了解,此次收购被认为总是可以的吧?所以developper可以测试自己的应用程序? :D

From what I understand, this purchase is supposed to always be possible, right? So The developper can test his app? :D

如果没有,我怎么能复位的状态,不归?我从谷歌应用内结算样品使用util包。

If not, how can I "reset" its state to not owned? I am using the util package from the Google In-App Billing Sample.

感谢您!

推荐答案

事实证明,该android.test.purchased项目的行为就像一个普通的ID。这意味着,如果你希望能够再次购买它,你必须在某个地方使用它在你的code。我认为,谷歌文档误导性在这个问题上,他们应该添加其他静态ID,可以用于测试目的无休止地购买。

It turns out that the android.test.purchased item behaves like a regular ID. It means that if you want be able to buy it again, you have to consume it somewhere in your code. I think that the Google documentation is misleading on this matter, and that they should add another static ID that you can buy endlessly for test purposes.