(double amount)
| 2135 | return mTotalDonations; |
| 2136 | } |
| 2137 | public boolean makeDonation(double amount) { |
| 2138 | final String itemName = "donation" + (amount >= 1 ? String.valueOf((int)amount) : String.valueOf(amount)); |
| 2139 | log.i("makeDonation is called, itemName=" + itemName); |
| 2140 | if (!billingSupported) |
| 2141 | return false; |
| 2142 | String mPayloadContents = null; |
| 2143 | String mSku = itemName; |
| 2144 | if (!mBillingService.requestPurchase(mSku, mPayloadContents)) { |
| 2145 | showToast("Purchase is failed"); |
| 2146 | } |
| 2147 | return true; |
| 2148 | } |
| 2149 | |
| 2150 | |
| 2151 | private static String DONATIONS_PREF_FILE = "cr3donations"; |
no test coverage detected