diff --git a/android/gradle.properties b/android/gradle.properties index c17e0668f..89b8a8a8e 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,5 +1,5 @@ ReactNativeWebView_kotlinVersion=1.6.0 -ReactNativeWebView_webkitVersion=1.4.0 +ReactNativeWebView_webkitVersion=1.14.0 ReactNativeWebView_compileSdkVersion=31 ReactNativeWebView_targetSdkVersion=31 ReactNativeWebView_minSdkVersion=21 diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml index b8f945d14..d9fdd5cc7 100644 --- a/android/src/main/AndroidManifest.xml +++ b/android/src/main/AndroidManifest.xml @@ -1,6 +1,18 @@ + + + + + + + + + + + + + + + + + + + + + + + + + **NOTE** > -> In order to restrict playing video in picture in picture mode this props need to be set to `false` -. +> In order to restrict playing video in picture in picture mode this props need to be set to `false`. + | Type | Required | Platform | | ---- | -------- | -------- | | bool | No | iOS | @@ -1718,6 +1719,15 @@ Default is `false`. Supported on iOS as of 16.4, previous versions always allow | ------- | -------- | -------- | | boolean | No | iOS & Android | +### `paymentRequestEnabled`[⬆](#props-index) + +Whether or not the webview has the Payment Request API enabled. Default is `false`. +This is needed for Google Pay to work within the WebView. + +| Type | Required | Platform | +| ------- | -------- | -------- | +| boolean | No | Android | + ## Methods ### `goForward()`[⬆](#methods-index) diff --git a/example/App.tsx b/example/App.tsx index b2dd6fafc..03843b998 100644 --- a/example/App.tsx +++ b/example/App.tsx @@ -21,6 +21,7 @@ import Messaging from './examples/Messaging'; import MultiMessaging from './examples/MultiMessaging'; import NativeWebpage from './examples/NativeWebpage'; import ApplePay from './examples/ApplePay'; +import GooglePay from './examples/GooglePay'; import CustomMenu from './examples/CustomMenu'; import OpenWindow from './examples/OpenWindow'; import SuppressMenuItems from './examples/Suppress'; @@ -123,6 +124,14 @@ const TESTS = { return ; }, }, + GooglePay: { + title: 'Google Pay ', + testId: 'GooglePay', + description: 'Test to open a Google Pay supported page', + render() { + return ; + }, + }, CustomMenu: { title: 'Custom Menu', testId: 'CustomMenu', @@ -250,6 +259,13 @@ export default class App extends Component { onPress={() => this._changeTest('ApplePay')} /> )} + {Platform.OS === 'android' && ( +