How to track in-app-purchases like Firebase?

708 Views Asked by At

I have recently tried Firebase and it is tracking in-app-purchases well. I am looking to implement similar feature so that my library can track in-app-purchases as well, but not able to find much hints to begin with. The API doc does not disclose any method so that a library can track in-app-purchase without making App's Activities extend my custom Activity.

Please help if someone knows how to track in-app-purchases from library without intercepting Activity's implementation.

1

There are 1 best solutions below

0
On BEST ANSWER

After researching on web and reference documents only solution, I am able to figure out is to create a Base Activity in your library and in onActivityResult process the transaction details and finally app's activities need to extend libraries base activity.

If anyone gets a better answer, just comment or answer here and I would love to accept that.