示例#1
0
 /** アイテムSTORE表示 */
 public static void openPurchaseView() {
   if (appCCloud == null) {
     // Log.w(TAG,"Plugin was not started.");
     return;
   }
   appCCloud.Purchase.callPurchaseActivity();
 }
示例#2
0
 /**
  * item数追加
  *
  * @param id
  * @param addCount
  */
 public static void addItemCount(String id, int addCount) {
   if (appCCloud == null) {
     // Log.w(TAG,"Plugin was not started.");
     return;
   }
   appCCloud.Purchase.addItemCount(id, addCount);
 }
示例#3
0
 /**
  * アイテム取得
  *
  * @param key  アイテムキー
  * @return JSON形式文字列
  */
 public static String getItem(String key) {
   AppCCloud._Purchase.Item item = appCCloud.Purchase.getItem(key);
   JSONObject json = new JSONObject();
   try {
     json.put("id", item.getKey());
     json.put("name", item.getName());
     json.put("count", item.getCount());
   } catch (Exception e) {
   }
   return json.toString();
 }
示例#4
0
 /**
  * 全アイテムを返す
  *
  * @return JSON形式、getItemの戻り値が配列になったもの
  */
 public static String getItems() {
   ArrayList<AppCCloud._Purchase.Item> items = appCCloud.Purchase.getItems();
   JSONArray jsonArray = new JSONArray();
   for (AppCCloud._Purchase.Item item : items) {
     JSONObject json = new JSONObject();
     try {
       json.put("id", item.getKey());
       json.put("name", item.getName());
       json.put("count", item.getCount());
     } catch (Exception e) {
       continue;
     }
     jsonArray.put(json);
   }
   return jsonArray.toString();
 }
示例#5
0
 /**
  * active item 設定
  *
  * @param key
  * @param ids
  */
 public static void setActiveItems(String key, String[] ids) {
   appCCloud.Purchase.setActiveItems(key, ids);
 }
示例#6
0
 /**
  * item数取得
  *
  * @param id
  * @return
  */
 public static int getItemCount(String id) {
   return appCCloud.Purchase.getItemCount(id);
 }
示例#7
0
 /**
  * item数設定
  *
  * @param id
  * @param count
  */
 public static void setItemCount(String id, int count) {
   if (appCCloud.Purchase != null) {
     appCCloud.Purchase.setItemCount(id, count);
   }
 }