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/8Purchases]: ℹ️ Debug logging enabled
21:55:08.745 D/5Purchases]: ℹ️ SDK Version - 5.0.0-rc2
21:55:08.745 D/>Purchases]: 👤 Initial App User ID - null
21:55:08.745 D/rPurchases]: 👤 Identifying App User ID: $RCAnonymousID:QQQQQQ
21:55:08.745 D/QPurchases]: ℹ️ Deleting old synced subscriber attributes that don't belong to $RCAnonymousID:QQQQQQ
21:55:08.750 D/QPurchases]: ℹ️ No cached Offerings, fetching from network
21:55:08.977 D/mPurchases]: ℹ️ Vending CustomerInfo from cache.
21:55:08.989 D/oPurchases]: ℹ️ Checking if cache is stale AppInBackground true
21:55:09.037 D/IPurchases]: ℹ️ App foregrounded
21:55:09.037 D/Purchases]: ℹ️ CustomerInfo cache is stale, updating from network in foreground.
21:55:09.038 D/oPurchases]: ℹ️ Checking if cache is stale AppInBackground false
21:55:09.038 D/sPurchases]: ℹ️ Skipping updating pending purchase queue since BillingClient is not connected yet.
21:55:09.038 D/lPurchases]: ℹ️ No subscriber attributes to synchronize.
21:55:09.129 D/sPurchases]: ℹ️ Starting connection for com.android.billingclient.api.BillingClientImpl@c6bbb0e
21:55:09.359 D/lPurchases]: ℹ️ Billing Service Setup finished for com.android.billingclient.api.BillingClientImpl@c6bbb0e
21:55:09.359 D/dPurchases]: ℹ️ Updating pending purchase queue
21:55:20.073 D/ePurchases]: ℹ️ API request started: GET /subscribers/%24RCAnonymousID%3AQQQQQQ
21:55:20.081 D/tPurchases]: ℹ️ API request completed with status: GET /subscribers/%24RCAnonymousID%3AQQQQQQ 304
21:55:20.084 D/tPurchases]: ℹ️ Querying purchases
21:55:20.090 D/4Purchases]: ℹ️ Cleaning previously sent tokens
21:55:20.090 D/:Purchases]: ℹ️ Tokens already posted: i]
21:55:20.090 D/nPurchases]: ℹ️ Saving tokens a]
21:55:20.090 D/ePurchases]: ℹ️ Tokens already posted: u]
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/qPurchases]: ℹ️ 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/5Purchases]: 💰 Retrieved skuDetailsList:
21:55:21.309 D/pPurchases]: ℹ️ Requesting products from the store with identifiers: prd_xx, prd_yy, prd_zz, prd_ss
21:55:21.315 D/rPurchases]: ℹ️ Products request finished for prd_xx, prd_yy, prd_zz, prd_ss
21:55:21.315 D/sPurchases]: 💰 Retrieved skuDetailsList: SkuDetails:
21:55:21.315 D/rPurchases]: 💰 prd_xx - SkuDetails:
21:55:21.315 D/sPurchases]: 💰 prd_yy - SkuDetails:
21:55:21.315 D/:Purchases]: 💰 prd_zz - SkuDetails: