{"id":3358,"date":"2025-06-09T14:17:53","date_gmt":"2025-06-09T14:17:53","guid":{"rendered":"https:\/\/techtrendfeed.com\/?p=3358"},"modified":"2025-06-09T14:17:53","modified_gmt":"2025-06-09T14:17:53","slug":"including-assist-for-google-pay-inside-android-webview","status":"publish","type":"post","link":"https:\/\/techtrendfeed.com\/?p=3358","title":{"rendered":"Including assist for Google Pay inside Android WebView"},"content":{"rendered":"<p> <br \/>\n<\/p>\n<div>\n<p data-block-key=\"bny6i\">Does your Android App embed an online checkout course of through the use of a WebView?<\/p>\n<p data-block-key=\"1u73f\">We&#8217;re glad to announce that Google Pay is now supported inside Android WebView. This characteristic is on the market in WebView beginning with model 137.<\/p>\n<h2 data-block-key=\"imxbo\" id=\"how-does-google-pay-within-android-webview-work\"><b><br \/><\/b>How does Google Pay inside Android WebView work?<\/h2>\n<p data-block-key=\"71luc\">The answer makes use of the <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/w3c.github.io\/payment-request\/\">Fee Request API<\/a> which permits launching Android fee apps when the web site is embedded within a WebView.<\/p>\n<p data-block-key=\"mg2r\">Beginning with Google Play Companies 25.18.30 (accessible immediately), Google Pay will set off the native fee sheet which implies person system tokens might be accessible for facilitation when triggered from inside a WebView.<\/p>\n<h2 data-block-key=\"bg8lx\" id=\"what-changes-are-required-for-my-app\"><b><br \/><\/b>What adjustments are required for my App?<\/h2>\n<p data-block-key=\"dsf4o\">Because the Fee Request API might be disabled by default for WebView, the next easy adjustments must be carried out:<\/p>\n<p data-block-key=\"cjeep\">Add (or replace) construct dependency:<\/p>\n<\/div>\n<div>\n<pre><code class=\"language-kotlin\">androidx.webkit:webkit:1.14.0<\/code><\/pre>\n<p>\n        Kotlin\n    <\/p>\n<\/div>\n<div>\n<p data-block-key=\"bny6i\">Add the next <code>queries<\/code> tags to your AndroidManifest.xml:<\/p>\n<\/div>\n<div>\n<p data-block-key=\"bny6i\">Allow the Fee Request API for the WebView you employ in your App. Be certain to make use of the proper import assertion. No different Google Pay particular adjustments are wanted.<\/p>\n<p data-block-key=\"6vt0g\"><b>Kotlin (Compose):<\/b><\/p>\n<\/div>\n<div>\n<pre><code class=\"language-kotlin\">import android.webkit.WebSettings;&#13;\nimport android.webkit.WebView;&#13;\nimport androidx.webkit.WebSettingsCompat;&#13;\nimport androidx.webkit.WebViewFeature;&#13;\n&#13;\nAndroidView(&#13;\n    manufacturing facility = {&#13;\n        WebView(it).apply {&#13;\n            \/\/ Replace WebView settings to permit JavaScript and fee request &#13;\n            settings.javaScriptEnabled = true            &#13;\n            if (WebViewFeature.isFeatureSupported(&#13;\n                    WebViewFeature.PAYMENT_REQUEST)) {&#13;\n                WebSettingsCompat.setPaymentRequestEnabled(settings, true);&#13;\n            }&#13;\n        }&#13;\n    },&#13;\n    replace = {&#13;\n      it.loadUrl(url)&#13;\n    }&#13;\n)<\/code><\/pre>\n<p>\n        Kotlin\n    <\/p>\n<\/div>\n<div>\n<pre><code class=\"language-java\">import android.webkit.WebSettings;&#13;\nimport android.webkit.WebView;&#13;\nimport androidx.webkit.WebSettingsCompat;&#13;\nimport androidx.webkit.WebViewFeature;&#13;\n&#13;\nWebView webView = findViewById(R.id.webview);&#13;\nWebSettings webSettings = webView.getSettings();&#13;\n&#13;\n\/\/ Replace WebView settings to permit JavaScript and fee request&#13;\nwebSettings.setJavaScriptEnabled(true);&#13;\nif (WebViewFeature.isFeatureSupported(WebViewFeature.PAYMENT_REQUEST)) {&#13;\n    WebSettingsCompat.setPaymentRequestEnabled(webSettings, true);&#13;\n}<\/code><\/pre>\n<p>\n        Java\n    <\/p>\n<\/div>\n<div>\n<div class=\"image-wrapper\">\n<p>                <img decoding=\"async\" class=\"regular-image\" src=\"https:\/\/storage.googleapis.com\/gweb-developer-goog-blog-assets\/images\/image1_dAsgxZP.original.jpg\" alt=\"An approved Android app integration\"\/><\/p>\n<p>\n                        An accepted Android app integration\n                    <\/p>\n<\/p><\/div><\/div>\n<div>\n<h2 data-block-key=\"bffhl\" id=\"unlock-seamless-payments-in-your-android-app\">Unlock seamless funds in your Android App<\/h2>\n<p data-block-key=\"ek07\">Supporting Google Pay inside Android WebView permits you to supply Google Pay to your Android customers when embedding your net checkout in your app. For extra help together with your implementation, register to the <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/goo.gle\/3Egv8IL\">Google Pay &amp; Pockets Console<\/a> to create a assist ticket. As well as, you may be part of the developer neighborhood within the <b>#funds<\/b> channel on <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/goo.gle\/payments-dev-community\">Discord<\/a>.<\/p>\n<p data-block-key=\"f1gab\">Observe <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/twitter.com\/GooglePayDevs\">@GooglePayDevs<\/a> on X for future updates. When you&#8217;ve got questions, tag <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/twitter.com\/GooglePayDevs?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Eauthor\">@GooglePayDevs<\/a> and embody #AskGooglePayDevs in your tweets.<\/p>\n<\/div>\n<p><template id="oEKY4VgtDOzYtXFo6nRj"></template><\/script><br \/>\n<br \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Does your Android App embed an online checkout course of through the use of a WebView? We&#8217;re glad to announce that Google Pay is now supported inside Android WebView. This characteristic is on the market in WebView beginning with model 137. How does Google Pay inside Android WebView work? The answer makes use of the [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":3360,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[56],"tags":[986,797,81,2436,392,3149],"class_list":["post-3358","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software","tag-adding","tag-android","tag-google","tag-pay","tag-support","tag-webview"],"_links":{"self":[{"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=\/wp\/v2\/posts\/3358","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3358"}],"version-history":[{"count":1,"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=\/wp\/v2\/posts\/3358\/revisions"}],"predecessor-version":[{"id":3359,"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=\/wp\/v2\/posts\/3358\/revisions\/3359"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=\/wp\/v2\/media\/3360"}],"wp:attachment":[{"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3358"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3358"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3358"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}<!-- This website is optimized by Airlift. Learn more: https://airlift.net. Template:. Learn more: https://airlift.net. Template: 69d9690a190636c2e0989534. Config Timestamp: 2026-04-10 21:18:02 UTC, Cached Timestamp: 2026-05-16 07:55:24 UTC -->