0
In the library Google Play Billing, could anyone inform me what the part is for handlePurchase(purchase)
? What exactly does she do?
@Override void onPurchasesUpdated(@BillingResponse int responseCode,
List<Purchase> purchases) {
if (responseCode == BillingResponse.OK
&& purchases != null) {
for (Purchase purchase : purchases) {
handlePurchase(purchase);
}
} else if (responseCode == BillingResponse.USER_CANCELED) {
// Handle an error caused by a user canceling the purchase flow.
} else {
// Handle any other error codes.
} }
It is a mandatory function for the purchase process or actually the purchase has already taken place and I could do anything (notify, open a warning window, consult purchase and etc.)?
What does that part mean?