thisisthekap / Xamarin.RevenueCat.Android

MIT License
6 stars 5 forks source link

ListenerConversionsKt method for UpdatedPurchaserInfoListener #20

Closed shimfish closed 3 years ago

shimfish commented 3 years ago

My understanding is that I need to use the ListenerConversionsKt methods for listeners like PurchasePackageWith().

However, there doesn't seem to be an easy way to set the UpdatedPurchaserInfoListener.

https://sdk.revenuecat.com/android/purchases/com.revenuecat.purchases.interfaces/-updated-purchaser-info-listener/index.html

Could/should this be added to ListenerConversionsKt?

shimfish commented 3 years ago

I see now that ListenerConversionsKt is actually part of RCs code. I thought it was a helper class that you added.

Oh well. Still can't work out how I should set up the UpdatedPurchaserInfoListener in C# then...

shimfish commented 3 years ago

Finally worked out that I just need to declare

public class DelegatingReceivePurchaserInfoListener : Java.Lang.Object, IUpdatedPurchaserInfoListener
{
        public void OnReceived(PurchaserInfo purchaserInfo)
        {
        }
}

Not being experienced in these things, I didn't realise I needed to inherit Java.Lang.Object to make this work.

thisisthekap commented 3 years ago

@shimfish You are welcome :)