MCPcopy Create free account
hub / github.com/buggins/coolreader / makeDonation

Method makeDonation

android/src/org/coolreader/CoolReader.java:2137–2148  ·  view source on GitHub ↗
(double amount)

Source from the content-addressed store, hash-verified

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";

Callers 1

onClickMethod · 0.80

Calls 4

showToastMethod · 0.95
requestPurchaseMethod · 0.80
iMethod · 0.65
valueOfMethod · 0.45

Tested by

no test coverage detected