(String type)
| 141 | } |
| 142 | |
| 143 | public List<String> getPurchases(String type) throws RemoteException { |
| 144 | // Get purchases |
| 145 | Bundle bundle = service.getPurchases(IAB_VERSION, context.getPackageName(), type, null); |
| 146 | Log.i(TAG, "getPurchases"); |
| 147 | Util.logBundle(bundle); |
| 148 | int response = (bundle == null ? -1 : bundle.getInt("RESPONSE_CODE", -1)); |
| 149 | Log.i(TAG, "Response=" + getResult(response)); |
| 150 | if (response != 0) |
| 151 | throw new IllegalArgumentException(getResult(response)); |
| 152 | |
| 153 | ArrayList<String> details = bundle.getStringArrayList("INAPP_PURCHASE_ITEM_LIST"); |
| 154 | return (details == null ? new ArrayList<String>() : details); |
| 155 | } |
| 156 | |
| 157 | public PendingIntent getBuyIntent(String sku, boolean subscription) throws RemoteException { |
| 158 | if (service == null) |
no test coverage detected