Closed assassin316 closed 3 years ago
Hmmm which version of the plugin are you using?
@jamesmontemagno 4.0.1.-beta
Hmmmm, the code looks correct on my end..
var skuDetailsParams = SkuDetailsParams.NewBuilder()
.SetType(skuType)
.SetSkusList(productIds)
.Build();
var skuDetailsResult = await BillingClient.QuerySkuDetailsAsync(skuDetailsParams);
Are your IAP active and are you in alpha/beta track?
I agree, I think the fault is not in your code, but rather something missing on my end. My IAP's are published and active and my app is published to Internal Testing (they got rid of the Alpha/Beta concept). I'll keep investigating and read up on some more docs to see if I missed something. I'll keep this issue up to date.
I am pretty sure you need to do "closed testing"
@jamesmontemagno ok I will try that out and report back with my results. Thanks for your time and input. It's a great library.
seems to hit the same.
in google docs stated that you may upload to any track including internal . so do i . inapps functionality appeared in google play console. but getproductinfoasync returns null till i found this thread, (only) uploaded binaries to closed track .. and occasionally getproductinfoasync starts working.
using ver 2.0.0
thank you
This was the fix. I pushed my app to Closed Testing (Alpha) and I received my in-app products. 👍 Thanks @jamesmontemagno !!
I'll keep an eye out for what @ish-1313 mentioned and see if I get the same behavior.
SOrry to reopen this.
I'm trying to use the GetProductInfoAsync(0 method. Got the latest great stable version 4.0.2 installed in Xamarin Forms solution in each proj.
Create a simple method in my billing service:
public async Task<string> GetLocalizedPrice(string prodId)
{
var billing = CrossInAppBilling.Current;
try
{
var connected = await billing.ConnectAsync(true);
string[] prodIds = new string[] { prodId };
var productfound = await billing.GetProductInfoAsync(ItemType.Subscription, prodIds);
InAppBillingProduct product = productfound.First();
return product.LocalizedPrice;
}
catch
{
return string.Empty;
}
}
All other functionality works well. I can check and restore purchases and make a purchase. Need to retrieve InAppBillingProduct info as I have different non-std pricing for different countries.
When the GetProductInfoAsync() method is called, the service just hangs, nothing else happens. Never goes further.
And yes, checked prodIDs etc. I'm only passing in one at a time.
This is targeting the Apple App Store. Not got to the PlayStore just yet.
Any guidance?
Thanks
Hi,
I've entered an issue in StackOverflow and also wanted to post here for visibility purposes. For some reason I never get my in-app products from my Play Console account. I've entered more details here:
https://stackoverflow.com/questions/65332635/unable-to-fetch-inapp-products-for-xamarin-android-using-plugin-inappbilling-pac/65358616#65358616