I'm trying to implement in app purchases in my app, there is a nice tutorial from Google themselves. However, on the first line of code I already get an error message...
When trying to use this code:
mBillingClient = BillingClient.newBuilder(mActivity).setListener(this).build();
Which I implement as:
`mBillingClient=BillingClient.newBuilder(this).setListener(this).build()`
I get error: incompatible types: MyActivity cannot be converted to PurchasesUpdatedListener
Your Activity
must implements PurchasesUpdatedListener
like :
public class YourActivity extends Activity implements PurchasesUpdatedListener {
...
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With