我試圖驗證產品是否從商店購買。在Android的應用程序結算中顯示錯誤:1003:購買簽名驗證失敗
對於我用下面的代碼:
mHelper.queryInventoryAsync(mGotInventoryListener);
而且回調是如下所述:
IabHelper.QueryInventoryFinishedListener mGotInventoryListener = new IabHelper.QueryInventoryFinishedListener() {
public void onQueryInventoryFinished(IabResult result, Inventory inventory) {
Log.d(TAG, "Query inventory finished.");
// Have we been disposed of in the meantime? If so, quit.
if (mHelper == null) return;
// Is it a failure?
**if (result.isFailure()) { // This fails in our case**
complain("Failed to query inventory: " + result);
return;
}
}
};
但每次我收到同樣的錯誤如下圖所示連接屏幕的時間。
我有嘗試以下提到的步驟,但未能獲得成功。
- 「base64EncodedPublicKey」從我們的谷歌播放帳戶,應用程序是在alpha測試模式下啓動
- 應用與發佈密鑰庫簽署覈實
- 「base64EncodedPublicKey」 - 複製到記事本,然後再複製到Java文件(閱讀這個解決方案的博客中的某處),但這對我並不適用。
任何人都可以提出相同的建議。請讓我知道如果我需要添加一些東西來解決這個問題?
「〜註冊廣播接收機**」的問題是什麼意思?這是什麼問題。 –