Пример #1
0
 @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 removeNonConsumableItem(String nonConsItemId)
     throws VirtualItemNotFoundException, ClassCastException {
   StoreUtils.LogDebug("SOOMLA", "removeNonConsumableItem is called from java!");
   StoreInventory.removeNonConsumableItem(nonConsItemId);
 }
 public static boolean nonConsumableItemExists(String nonConsItemId)
     throws VirtualItemNotFoundException, ClassCastException {
   StoreUtils.LogDebug("SOOMLA", "nonConsumableItemExists is called from java!");
   return StoreInventory.nonConsumableItemExists(nonConsItemId);
 }
 public static void removeUpgrades(String goodItemId) throws VirtualItemNotFoundException {
   StoreUtils.LogDebug("SOOMLA", "removeUpgrades is called from java!");
   StoreInventory.removeUpgrades(goodItemId);
 }
 public static void upgradeVirtualGood(String goodItemId)
     throws VirtualItemNotFoundException, InsufficientFundsException {
   StoreUtils.LogDebug("SOOMLA", "upgradeVirtualGood is called from java!");
   StoreInventory.upgradeVirtualGood(goodItemId);
 }
 public static String getGoodCurrentUpgrade(String goodItemId)
     throws VirtualItemNotFoundException {
   StoreUtils.LogDebug("SOOMLA", "removeGoodAmount is called from java!");
   return StoreInventory.getGoodCurrentUpgrade(goodItemId);
 }
 public static int getGoodUpgradeLevel(String goodItemId) throws VirtualItemNotFoundException {
   StoreUtils.LogDebug("SOOMLA", "getGoodUpgradeLevel is called from java!");
   return StoreInventory.getGoodUpgradeLevel(goodItemId);
 }
 public static boolean isVirtualGoodEquipped(String goodItemId)
     throws VirtualItemNotFoundException {
   StoreUtils.LogDebug("SOOMLA", "isVirtualGoodEquipped is called from java!");
   return StoreInventory.isVirtualGoodEquipped(goodItemId);
 }
 public static void unEquipVirtualGood(String goodItemId) throws VirtualItemNotFoundException {
   StoreUtils.LogDebug("SOOMLA", "unEquipVirtualGood is called from java!");
   StoreInventory.unEquipVirtualGood(goodItemId);
 }
 public static void takeItem(String itemId, int amount) throws VirtualItemNotFoundException {
   StoreUtils.LogDebug("SOOMLA", "removeCurrencyAmount is called from java!");
   StoreInventory.takeVirtualItem(itemId, amount);
 }
 public static int getItemBalance(String itemId) throws VirtualItemNotFoundException {
   StoreUtils.LogDebug("SOOMLA", "getCurrencyBalance is called from java!");
   return StoreInventory.getVirtualItemBalance(itemId);
 }
 public static void buy(String itemId)
     throws VirtualItemNotFoundException, InsufficientFundsException {
   StoreUtils.LogDebug("SOOMLA", "buy is called from java!");
   StoreInventory.buy(itemId);
 }