@Override public void onVideoGratified(VideoResponse videoResponse) { //Your implementation try { String itemid = StoreAssets.COIN_CURRENCY.getItemId(); int coins = (int) Float.parseFloat(videoResponse.getCoins()); StoreInventory.giveVirtualItem(itemid, coins); } catch(VirtualItemNotFoundException e) {
public static void giveItem(String itemId, int amount) throws VirtualItemNotFoundException { StoreUtils.LogDebug("SOOMLA", "addCurrencyAmount is called from java!"); StoreInventory.giveVirtualItem(itemId, amount); }