Stack Overflow Asked by Maximus on January 17, 2021
I’m having trouble retrieving my in-app products for my Android Xamarin app. I’m using the Plugin.InAppBilling
nuget package (version 4.0.1-beta) to implement the billing functionality. To begin, I following the documentation which states the following:
Android Testing:
- You MUST use a physical device. Emulators do not work.
- Ensure you have app in Alpha/Beta with the NuGet installed. This will add “com.android.vending.BILLING” permission for you
- Create an IAB product, make sure it is published and active
- Add a test account to the app, ensure it is the main account on device, and that account is opted-in as tester
- Validated your version code and number in your development environment match what is in the Play store.
- You MUST sign the APK even in debug mode.
GetProductInfoAsync
:private partial async Task FetchProductDetails(bool isAdsDisabled)
{
var billing = CrossInAppBilling.Current;
try
{
//You must connect
var connected = await billing.ConnectAsync();
if (!connected)
{
//Couldn't connect
return;
}
var products = await billing.GetProductInfoAsync(ItemType.InAppPurchase, productIds);
.
.
.
}
catch (Exception ex)
{
...
}
finally
{
await billing.DisconnectAsync();
}
}
Anyone know if I missed a step? Something missing?
As mentioned in the documentation, you need an app in Alpha/Beta. Internal testing will not work.
Correct answer by dwey on January 17, 2021
License Response. You have Licensed. I've always used RESPOND_NORMALLY.
I'm not using the plug in as I wrote my own using xamarin.android.google.billingclient3.0.0. All working here.
Well, what happens when you debug GetProductInfoAsync?
Answered by user2153142 on January 17, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP