• About Us
  • Privacy Policy
  • Disclaimer
  • Contact Us
TechTrendFeed
  • Home
  • Tech News
  • Cybersecurity
  • Software
  • Gaming
  • Machine Learning
  • Smart Home & IoT
No Result
View All Result
  • Home
  • Tech News
  • Cybersecurity
  • Software
  • Gaming
  • Machine Learning
  • Smart Home & IoT
No Result
View All Result
TechTrendFeed
No Result
View All Result

Including assist for Google Pay inside Android WebView

Admin by Admin
June 9, 2025
Home Software
Share on FacebookShare on Twitter


Does your Android App embed an online checkout course of through the use of a WebView?

We’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 Fee Request API which permits launching Android fee apps when the web site is embedded within a WebView.

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.


What adjustments are required for my App?

Because the Fee Request API might be disabled by default for WebView, the next easy adjustments must be carried out:

Add (or replace) construct dependency:

androidx.webkit:webkit:1.14.0

Kotlin

Add the next queries tags to your AndroidManifest.xml:

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.

Kotlin (Compose):

import android.webkit.WebSettings;
import android.webkit.WebView;
import androidx.webkit.WebSettingsCompat;
import androidx.webkit.WebViewFeature;

AndroidView(
    manufacturing facility = {
        WebView(it).apply {
            // Replace WebView settings to permit JavaScript and fee request 
            settings.javaScriptEnabled = true            
            if (WebViewFeature.isFeatureSupported(
                    WebViewFeature.PAYMENT_REQUEST)) {
                WebSettingsCompat.setPaymentRequestEnabled(settings, true);
            }
        }
    },
    replace = {
      it.loadUrl(url)
    }
)

Kotlin

import android.webkit.WebSettings;
import android.webkit.WebView;
import androidx.webkit.WebSettingsCompat;
import androidx.webkit.WebViewFeature;

WebView webView = findViewById(R.id.webview);
WebSettings webSettings = webView.getSettings();

// Replace WebView settings to permit JavaScript and fee request
webSettings.setJavaScriptEnabled(true);
if (WebViewFeature.isFeatureSupported(WebViewFeature.PAYMENT_REQUEST)) {
    WebSettingsCompat.setPaymentRequestEnabled(webSettings, true);
}

Java

An approved Android app integration

An accepted Android app integration

Unlock seamless funds in your Android App

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 Google Pay & Pockets Console to create a assist ticket. As well as, you may be part of the developer neighborhood within the #funds channel on Discord.

Observe @GooglePayDevs on X for future updates. When you’ve got questions, tag @GooglePayDevs and embody #AskGooglePayDevs in your tweets.



Tags: AddingAndroidGooglePaysupportWebView
Admin

Admin

Next Post
As Xbox Sport Costs Rise, a Sport Go Subscription Appears to be like Higher Than Ever

As Xbox Sport Costs Rise, a Sport Go Subscription Appears to be like Higher Than Ever

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Trending.

Discover Vibrant Spring 2025 Kitchen Decor Colours and Equipment – Chefio

Discover Vibrant Spring 2025 Kitchen Decor Colours and Equipment – Chefio

May 17, 2025
Reconeyez Launches New Web site | SDM Journal

Reconeyez Launches New Web site | SDM Journal

May 15, 2025
Safety Amplified: Audio’s Affect Speaks Volumes About Preventive Safety

Safety Amplified: Audio’s Affect Speaks Volumes About Preventive Safety

May 18, 2025
Flip Your Toilet Right into a Good Oasis

Flip Your Toilet Right into a Good Oasis

May 15, 2025
Apollo joins the Works With House Assistant Program

Apollo joins the Works With House Assistant Program

May 17, 2025

TechTrendFeed

Welcome to TechTrendFeed, your go-to source for the latest news and insights from the world of technology. Our mission is to bring you the most relevant and up-to-date information on everything tech-related, from machine learning and artificial intelligence to cybersecurity, gaming, and the exciting world of smart home technology and IoT.

Categories

  • Cybersecurity
  • Gaming
  • Machine Learning
  • Smart Home & IoT
  • Software
  • Tech News

Recent News

How authorities cyber cuts will have an effect on you and your enterprise

How authorities cyber cuts will have an effect on you and your enterprise

July 9, 2025
Namal – Half 1: The Shattered Peace | by Javeria Jahangeer | Jul, 2025

Namal – Half 1: The Shattered Peace | by Javeria Jahangeer | Jul, 2025

July 9, 2025
  • About Us
  • Privacy Policy
  • Disclaimer
  • Contact Us

© 2025 https://techtrendfeed.com/ - All Rights Reserved

No Result
View All Result
  • Home
  • Tech News
  • Cybersecurity
  • Software
  • Gaming
  • Machine Learning
  • Smart Home & IoT

© 2025 https://techtrendfeed.com/ - All Rights Reserved