通过我的项目修改它来完成v3示例文件工作正常.然而,我的朋友刚刚关闭wi-fi并打开飞机模式来测试代码.这似乎导致无法查询应用内广告资源.
// Listener that's called when we finish querying the items and subscriptions we own
private final IabHelper.QueryInventoryFinishedListener mGotInventoryListener = new IabHelper.QueryInventoryFinishedListener() {
@Override
public void onQueryInventoryFinished(IabResult result, Inventory inventory) {
if (result.isFailure()) {
// STOPS here and doesn't continue on with no network connection
return;
}
......
}
};
Run Code Online (Sandbox Code Playgroud)
我认为在初次成功购买后,v3将其本地存储在其缓存中,以便它不必总是有网络连接来检查.还有其他人遇到过这个问题吗?我希望我遗漏了一些完全明显的东西,或者这是否应该如何运作.