InAppBilling real products

In the xamarin example you can find the following QueryInventoryAsync method to get your products.

_products = await _serviceConnection.BillingHandler.QueryInventoryAsync(new List {
"appra_01_test",
"appra_02_sub",
ReservedTestProductIDs.Purchased
}, ItemType.Product);

This returns a list of build in test products. But now I want to publish my app and use the real products I've added.
I'm assuming you have to replace the 'new List{ .. }' part, with your own list, but I'm not sure what that list should could contain?

An example of what the code should be when using real products would be much appreciated.

Kind regards,

Tim

Posts

  • tvandelochttvandelocht USMember

    If it's the product id's of your products, you would have to update your app eachtime you add a new product? Which seems weird to me, because you can already activate and deactivate your products in you development console..

  • KMullinsKMullins USMember, Xamarin Team Xamurai

    tvandelocht,

    Unfortunately there is no mechanism for querying for inventory from Google Play if the product IDs are not already known by the application (BTW, Apple's In App Purchasing has the same limitation).

    What you could do is host the list of available Product IDs as XML or JSON on your own server and have the app query that file, then use the contained IDs to pull the full information from Google Play.

    Please let me know if you have any questions.

    Kevin

  • tvandelochttvandelocht USMember
    edited April 2014

    Hey Kevin,

    Thank you for your response! For now I've made a xml file with product id's and added it to my values folder in Resources.

    <?xml version="1.0" encoding="utf-8"?> <resources> <string-array name="product_ids"> <item>productid1</item> <item>productid2</item> </string-array> </resources>

    This seemed cleaner than adding it hardcoded to my code. But I think I like your suggestion (to put a xml on my own server) better so I’m definitely considering that!

    Uploading our application each time we want to add a product would be such a hassle. Especially with the time that's wasted when IOS is validating the app..

    So thank you for the suggestion!

    Grtz

  • KMullinsKMullins USMember, Xamarin Team Xamurai

    Grtz,

    I'd also like to point out that there is an issue with the Android Xamarin.InAppBilling component that will can cause it to fail on some Android devices, but not on others. We are currently working on a solution but are having a hard time tracking down the exact nature of the failure since it isn't 100% repeatable.

    If you do run into an issue, please let me know and we'll work with you to see if we can get this fixed ASAP!

    Please let me know if you need anything else.

    Thanks,

    Kevin

  • tvandelochttvandelocht USMember

    Kevin,

    Do you have any idea how long it will take before this issue is fixed?
    How many devices does this issue affect?

    I'm planning a release in 3 weeks and I was kind of counting on the use of the In App Billing component..

    Please some more information about this issue (what exactly goes wrong?) and about the scale of it (will it affect a lot of users?)??

    Kind regards,

    Tim

  • KMullinsKMullins USMember, Xamarin Team Xamurai

    @tvandelocht,

    Everything should be working correctly now. I'll be releasing a patch today that solves the last null exception that could leak via the GetPurchases call. Aside from that, we have been unable to reproduce the failure that a few users have been reporting.

    As long as the component is currently working inside your project, everything should be ok.

    Please let me know if you have any other questions or need anything else.

    Thanks,

    Kevin

  • KMullinsKMullins USMember, Xamarin Team Xamurai

    @tvandelocht‌,

    Version 01.05 of the Xamarin.InAppBilling component is now live in the store.

    Please let me know if you need anything else.

    Thanks,

    Kevin

  • tvandelochttvandelocht USMember

    Okay, thank you for your help. It is greatly appreciated! :)

Sign In or Register to comment.