Skip to main content
Question

Android fetching offerings is very slow

  • May 26, 2022
  • 1 reply
  • 232 views

Forum|alt.badge.img+3

I am using android kotlin sdk for fetching the offerings (google play, IAP products). But the fetching of offering is very slow (~15s). In my application users can see the list of products as soon as they open the app. So showing a loading screen for 10-15 seconds until i can show products is giving a bad user experience. I tested the public revenuecat apis separately and they are pretty fast (<0.3s).

I am using `Purchases.sharedInstance.getOfferingsWith` as instructed in the docs.
I am initializing the SDK at application start.

From logs i can see a 10s delay “Updating pending purchase queue” and “starting http requests”

Logs:

21:55:08.744  D/[Purchases]: ℹ️ Debug logging enabled
21:55:08.745  D/[Purchases]: ℹ️ SDK Version - 5.0.0-rc2
21:55:08.745  D/[Purchases]: 👤 Initial App User ID - null
21:55:08.745  D/[Purchases]: 👤 Identifying App User ID: $RCAnonymousID:QQQQQQ
21:55:08.745  D/[Purchases]: ℹ️ Deleting old synced subscriber attributes that don't belong to $RCAnonymousID:QQQQQQ
21:55:08.750  D/[Purchases]: ℹ️ No cached Offerings, fetching from network
21:55:08.977  D/[Purchases]: ℹ️ Vending CustomerInfo from cache.
21:55:08.989  D/[Purchases]: ℹ️ Checking if cache is stale AppInBackground true
21:55:09.037  D/[Purchases]: ℹ️ App foregrounded
21:55:09.037  D/[Purchases]: ℹ️ CustomerInfo cache is stale, updating from network in foreground.
21:55:09.038  D/[Purchases]: ℹ️ Checking if cache is stale AppInBackground false
21:55:09.038  D/[Purchases]: ℹ️ Skipping updating pending purchase queue since BillingClient is not connected yet.
21:55:09.038  D/[Purchases]: ℹ️ No subscriber attributes to synchronize.
21:55:09.129  D/[Purchases]: ℹ️ Starting connection for com.android.billingclient.api.BillingClientImpl@c6bbb0e
21:55:09.359  D/[Purchases]: ℹ️ Billing Service Setup finished for com.android.billingclient.api.BillingClientImpl@c6bbb0e
21:55:09.359  D/[Purchases]: ℹ️ Updating pending purchase queue

21:55:20.073  D/[Purchases]: ℹ️ API request started: GET /subscribers/%24RCAnonymousID%3AQQQQQQ
21:55:20.081  D/[Purchases]: ℹ️ API request completed with status: GET /subscribers/%24RCAnonymousID%3AQQQQQQ 304
21:55:20.084  D/[Purchases]: ℹ️ Querying purchases
21:55:20.090  D/[Purchases]: ℹ️ Cleaning previously sent tokens
21:55:20.090  D/[Purchases]: ℹ️ Tokens already posted: []
21:55:20.090  D/[Purchases]: ℹ️ Saving tokens []
21:55:20.090  D/[Purchases]: ℹ️ Tokens already posted: []
21:55:21.297  D/[Purchases]: ℹ️ API request started: GET /subscribers/%24RCAnonymousID%3AQQQQQQ/offerings
21:55:21.299  D/[Purchases]: ℹ️ API request completed with status: GET /subscribers/%24RCAnonymousID%3AQQQQQQ/offerings 304
21:55:21.301  D/[Purchases]: ℹ️ Requesting products from the store with identifiers: prd_xx, prd_yy, prd_zz, prd_ss
21:55:21.309  D/[Purchases]: ℹ️ Products request finished for prd_xx, prd_yy, prd_zz, prd_ss
21:55:21.309  D/[Purchases]: 💰 Retrieved skuDetailsList: 
21:55:21.309  D/[Purchases]: ℹ️ Requesting products from the store with identifiers: prd_xx, prd_yy, prd_zz, prd_ss
21:55:21.315  D/[Purchases]: ℹ️ Products request finished for prd_xx, prd_yy, prd_zz, prd_ss
21:55:21.315  D/[Purchases]: 💰 Retrieved skuDetailsList: SkuDetails: 
21:55:21.315  D/[Purchases]: 💰 prd_xx - SkuDetails: 
21:55:21.315  D/[Purchases]: 💰 prd_yy - SkuDetails:
21:55:21.315  D/[Purchases]: 💰 prd_zz - SkuDetails: 


 

1 reply

Forum|alt.badge.img+4

@fallenbug any updates on this issue? I am experiencing a similar problem. 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings