@Override public void onIabPurchaseFinished(IabResult result, Purchase info) { ThemeManager themes = game.getThemeManager(); if (result.isFailure()) { Log.e(LOGGER, "Purchase failed: " + result); Toast.makeText(this, "In-App Purchase Failed or was cancelled.", Toast.LENGTH_LONG).show(); } else if (RANDOM_BOT_SKU.equals(info.getSku())) { Log.d(LOGGER, "Purchase of RandomBot succeeded."); purchaseRandomBot(); } else if (themes.purchaseTheme(info.getSku())) { Log.d(LOGGER, "Theme Purchased"); } }
public void onIabPurchaseFinished(IabResult result, Purchase purchase) { Log.d(TAG, "Purchase finished: " + result + ", purchase: " + purchase); if (result.isFailure()) { complain("Error purchasing: " + result); setWaitScreen(false); return; } Log.d(TAG, "Purchase successful."); setWaitScreen(false); Log.d(TAG, purchase.getSku() + " purchased successfully."); }