0

I'm trying to use the latest in app billing library of this sample but I have doubt about its lifecycle onConsumeFinished is called before or after onPurchasesUpdated?

When I should release resources?

Should I update status in onPurchasesUpdated or I have to use onActivityResult after the user have purchased an item from the Google Play purchase dialog?

AndreaF
  • 11,975
  • 27
  • 102
  • 168

1 Answers1

0

The documentation about the lifecycle is all here.

When to update status depends on your design. Remember that purchases might change status outside your app's flow (for example if the user gets a refund) and also that your app might be killed (eg if the device gets low on memory after the user switches to another app) so you need to handle purchase status correctly both on App startup and during the normal purchase flow.

Nick Fortescue
  • 13,530
  • 1
  • 31
  • 37