Cart session dropping inside custom Android WebView storefront checkout

I have been working on integrating our Shopify headless storefront into a custom Android wrapper inspired by the mojolauncher.net setup for our community merchandise store. While the Storefront API fetches collections and variants without any latency issues, we are hitting a roadblock whenever users transition into the web checkout flow inside the embedded webview, where the session intermittently drops the cart items or flags an invalid checkout token.

The issue seems to worsen whenever users background the app during payment processing or when switching between mobile data and local networks. I have checked our cookie forwarding and local storage configurations, but I am still trying to learn more about how the Shopify hosted checkout manages session state across restricted mobile clients and whether switching entirely to the Cart API with an explicit buyer identity token would provide a more stable handoff.

Has anyone here solved similar session loss problems when embedding Shopify checkout into custom mobile launcher environments? Any advice on handling cross-domain webview cookies or debugging the redirect headers in this scenario would be greatly appreciated.

1 Like