Shopify / checkout-sheet-kit-android

Shopify’s Checkout Sheet Kit makes it simple to perform a checkout inside your Android app.
MIT License
12 stars 3 forks source link

Call onPause when preloading allowing PageVisibility API to return th… #103

Closed kiftio closed 5 months ago

kiftio commented 5 months ago

…e correct value

What are you trying to accomplish?

See the issue here for more details on how PageVisbility API and WebViews work together.

https://partnerissuetracker.corp.google.com/issues/40446497

Specifically So now, if an app wants to toggle blink page visibility, it has to call WebView#onPause/onResume. The visibility of the window that the WebView is attached to is not under control of the app.

https://developer.android.com/reference/android/webkit/WebView#onPause()

https://github.com/Shopify/checkout-sheet-kit-android/assets/15106863/7db6a072-2f0e-4cbc-ab44-ff2578af0e33

Before you deploy