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.
After researching on web and reference documents only solution, I am able to figure out is to create a
Base Activityin your library and inonActivityResultprocess thetransaction detailsand finally app'sactivitiesneed to extend libraries base activity.If anyone gets a better answer, just comment or answer here and I would love to accept that.