#gaa-ra_code

1 messages · Page 1 of 1 (latest)

tropic copperBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1265728453622239357

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

thorn pilot
amber torrent
#

Thank you so much for your response. I got the reason for the problem.

Just want to clarify few things

This is the Webview used in the mobile apps,

<WebView injectedJavaScriptBeforeContentLoaded={injectedJS} ref={webViewRef} allowsBackForwardNavigationGestures={false} source={{ uri: websiteUrl }} .... />;

I have tried to enable the JS and few more android related props

// Android specific settings javaScriptEnabled={true} domStorageEnabled={true} allowFileAccess={true} mixedContentMode=“always”

Following the documentation, I assume that enabling JS is not enough and I have to create a JAVA class for googlePay API and using addJavascriptInterface it should be displayed/used in the JS webview.

Is that right?

addJavascriptInterface: https://developer.android.com/reference/android/webkit/WebView#addJavascriptInterface(java.lang.Object, java.lang.String)

thorn pilot
#

Correct, you'd need to find a way to invoke device's native APIs for this. Unfortunately, that's not something Stripe SDKs support so none of us are very familiar with the flow.

amber torrent
#

Thanks again, it's very useful. I will look for a solution with the available information.