In-app billing v3 unable to query items without network connection or in airplane/flight mode

后端 未结 4 847
长发绾君心
长发绾君心 2020-12-06 02:14

Going through the v3 example file in modifying it with my project works fine. However my friend just tested the code by turning wi-fi off and turning on airplane mode. This

4条回答
  •  醉酒成梦
    2020-12-06 02:47

    I solved the problem that away:

    final ArrayList iabItemSkus = new ArrayList();
    iabItemSkus.add(MyGame.productID_FULLVERSION);
    
    // Disable SKU details if no network connection
    boolean checkSkuDetails = isWifiConnected() ? true : false;
    
    Gdx.app.log("IAB", "checkSkuDetails : " + checkSkuDetails);
    
    mHelper.queryInventoryAsync(checkSkuDetails, iabItemSkus, mGotInventoryListener);
    

    Not get Sku details if not network.

提交回复
热议问题