Android-inapp-billing-v3: getSubscriptionListingDetails

Created on 1 Aug 2016  路  10Comments  路  Source: anjlab/android-inapp-billing-v3

Everything works fine but I can't get the listing details for a subscription.

I run this code after it the initializes like in the example provided.

SkuDetails subs = bp.getSubscriptionListingDetails(SUBSCRIPTION_ID);

and it always returns null.

In app purchases and restoring works on the same subscription, but I can't get the details!

FAQ

All 10 comments

It just decided to work on it's own. I didn't do anything different.

I have same issue. I have a test app that is published and when I execute bp.getPurchaseListingDetails(PRODUCT_ID), it always returns null. I have followed step-by-step instruction at link below, but doesn't work and always returns null.

https://github.com/anjlab/android-inapp-billing-v3

This happens because getSubscriptionListingDetails and other synchronous methods in this library works by fetching data from a local storage maintained by the library itself as cache for purchase and product details.

This requires data to be loaded at least once (_i.e., purchase to be made or listings to be fetched, etc_). If there are no data available in the cache, these methods will return null.

So, there's no way to get the prices of the available subscriptions? That's basically the only thing I need to know from the listenings. Since the prices change dynamically and must be displayed different, depending on currency?

@rahulchowdhury 馃憤
@MaximilianKeppeler you probably need to use loadOwnedPurchasesFromGoogle(). The interesting thing is why it is not called for your when you initialise BillingProcessor instance. Do you have a logcat output for that?

get...ListingDetails methods will return null unless new purchase/subscription data is propagated form Google Play console to devices. So you need to wait couple hours

getSubscriptionListingDetails("id") will return null if not connected to internet. It took me 2hours to figure out that i am not connected to internet. The documentation is really bad for this Library.

need call getSubscriptionListingDetails in method onBillingInitialized, not immediately.

need call getSubscriptionListingDetails in method onBillingInitialized, not immediately.

worked for me

need call getSubscriptionListingDetails in method onBillingInitialized, not immediately.

So what if user goes to Upgrade to PRO dialog before this happens? I need listing details right from the start.

Was this page helpful?
0 / 5 - 0 ratings