Issue
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.
Therefore I have the following specified in my Android csproj:
This is my aab package in the Play Console in Internal Testing with 2 testers:
Here are the testers also added as Licensed Testers:
However, using the following code doesn't return any products from the call to 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?
Solution
As mentioned in the documentation, you need an app in Alpha/Beta. Internal testing will not work.
Answered By - dwey
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.