Android 应用内结算 getPurchaseHistory() 不起作用

Android In-app billing getPurchaseHistory() doesn't work

根据in-app billing reference and the next aidl definition,有方法getPurchaseHistory()。代码很简单:

Bundle purchaseHistoryBundle = service.getPurchaseHistory(6, BuildConfig.APPLICATION_ID, "subs", null, new Bundle());

我得到的响应是 6 (BILLING_RESPONSE_RESULT_ERROR)。这意味着 "Fatal error during the API action"

代码有什么问题?如果是服务中的错误,应该在哪里报告?

请立即尝试您的代码。 getPurchaseHistory() 现在有效。