-
Notifications
You must be signed in to change notification settings - Fork 62
Open
Description
@jonathanpeppers thanks, manually specifying Xamarin.AndroidX.SavedState
helps.
However, I now experience a crash using the 8.0.0.1
version when trying to access ResponseCode
after calling QueryProductDetailsAsync
in certain situations.
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'Android.BillingClient.Api.BillingResult'.
at Java.Interop.JniPeerMembers.AssertSelf(IJavaPeerable self) in /Users/runner/work/1/s/xamarin-android/external/Java.Interop/src/Java.Interop/Java.Interop/JniPeerMembers.cs:line 153
at Java.Interop.JniPeerMembers.JniInstanceMethods.InvokeAbstractInt32Method(String encodedMember, IJavaPeerable self, JniArgumentValue* parameters) in /Users/runner/work/1/s/xamarin-android/external/Java.Interop/src/Java.Interop/Java.Interop/JniPeerMembers.JniInstanceMethods_Invoke.cs:line 484
at Android.BillingClient.Api.BillingResult.get_ResponseCode() in D:\a\_work\1\s\generated\com.android.billingclient.billing\obj\Release\net9.0-android35.0\generated\src\Android.BillingClient.Api.BillingResult.cs:line 253
var productList = new[] { QueryProductDetailsParams.Product.NewBuilder().SetProductId(sku).SetProductType(productType).Build() };
var _params = QueryProductDetailsParams.NewBuilder().SetProductList(productList).Build();
var returnValue = await billingClient.QueryProductDetailsAsync(_params);
if (returnValue.Result.ResponseCode == BillingResponseCode.Ok) { ... } // <-- crashes here

The same code does not crash when using 7.1.1.4
Originally posted by @tipa in #1207 (comment)
Copilot
Metadata
Metadata
Assignees
Labels
No labels