How to know action triggers the addCustomerInfoUpdateListener

  • 31 January 2023
  • 1 reply

Badge +3

This method will fire whenever the SDK receives an updated CustomerInfo object from calls to getCustomerInfo(), purchase(package:), purchase(product:), or restorePurchases().


Is there a way to tell what causes the method passed to addCustomerInfoUpdateListener to be called?  It will be nice to be able to tell the difference between a purchase and restore when it fires.


Best answer by cody 2 February 2023, 18:07

View original

1 reply

Userlevel 6
Badge +8

Hey @devTNT!

Unfortunately not at this time - the method will be fired when any changes are received for the cached CustomerInfo object. As a workaround, you may be able to store a value somewhere in your app when a user attempts a purchase vs. a restore so you know the last ‘action’ before the listener was fired.