@capgo/inappbrowser 7.27.0 → 7.27.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build.gradle +1 -0
- package/android/src/main/java/ee/forgr/capacitor_inappbrowser/InAppBrowserPlugin.java +1 -1
- package/android/src/main/java/ee/forgr/capacitor_inappbrowser/WebViewDialog.java +10 -0
- package/ios/Sources/InAppBrowserPlugin/InAppBrowserPlugin.swift +1 -1
- package/package.json +1 -1
package/android/build.gradle
CHANGED
|
@@ -60,4 +60,5 @@ dependencies {
|
|
|
60
60
|
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
|
|
61
61
|
implementation "androidx.browser:browser:$androidxBrowserVersion"
|
|
62
62
|
implementation 'com.google.android.material:material:1.13.0'
|
|
63
|
+
implementation 'androidx.webkit:webkit:1.14.0'
|
|
63
64
|
}
|
|
@@ -50,7 +50,7 @@ import org.json.JSONObject;
|
|
|
50
50
|
)
|
|
51
51
|
public class InAppBrowserPlugin extends Plugin implements WebViewDialog.PermissionHandler {
|
|
52
52
|
|
|
53
|
-
private final String PLUGIN_VERSION = "7.27.
|
|
53
|
+
private final String PLUGIN_VERSION = "7.27.1";
|
|
54
54
|
|
|
55
55
|
public static final String CUSTOM_TAB_PACKAGE_NAME = "com.android.chrome"; // Change when in stable
|
|
56
56
|
private CustomTabsClient customTabsClient;
|
|
@@ -57,6 +57,8 @@ import androidx.core.graphics.Insets;
|
|
|
57
57
|
import androidx.core.view.ViewCompat;
|
|
58
58
|
import androidx.core.view.WindowInsetsCompat;
|
|
59
59
|
import androidx.core.view.WindowInsetsControllerCompat;
|
|
60
|
+
import androidx.webkit.WebSettingsCompat;
|
|
61
|
+
import androidx.webkit.WebViewFeature;
|
|
60
62
|
import com.caverock.androidsvg.SVG;
|
|
61
63
|
import com.caverock.androidsvg.SVGParseException;
|
|
62
64
|
import com.getcapacitor.JSObject;
|
|
@@ -367,6 +369,14 @@ public class WebViewDialog extends Dialog {
|
|
|
367
369
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
|
368
370
|
_webView.getSettings().setMixedContentMode(android.webkit.WebSettings.MIXED_CONTENT_COMPATIBILITY_MODE);
|
|
369
371
|
}
|
|
372
|
+
|
|
373
|
+
// Enable Payment Request API only if feature is supported
|
|
374
|
+
if (WebViewFeature.isFeatureSupported(WebViewFeature.PAYMENT_REQUEST)) {
|
|
375
|
+
WebSettingsCompat.setPaymentRequestEnabled(_webView.getSettings(), true);
|
|
376
|
+
Log.d("InAppBrowser", "Payment Request API enabled");
|
|
377
|
+
} else {
|
|
378
|
+
Log.d("InAppBrowser", "Payment Request API not supported on this device");
|
|
379
|
+
}
|
|
370
380
|
}
|
|
371
381
|
|
|
372
382
|
// Set web view background color
|
|
@@ -24,7 +24,7 @@ extension UIColor {
|
|
|
24
24
|
*/
|
|
25
25
|
@objc(InAppBrowserPlugin)
|
|
26
26
|
public class InAppBrowserPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
27
|
-
private let PLUGIN_VERSION: String = "7.27.
|
|
27
|
+
private let PLUGIN_VERSION: String = "7.27.1"
|
|
28
28
|
public let identifier = "InAppBrowserPlugin"
|
|
29
29
|
public let jsName = "InAppBrowser"
|
|
30
30
|
public let pluginMethods: [CAPPluginMethod] = [
|