diff --git a/web/lib/util/webview.ts b/web/lib/util/webview.ts index 39396799..cecdb7bd 100644 --- a/web/lib/util/webview.ts +++ b/web/lib/util/webview.ts @@ -1,8 +1,14 @@ +import {Capacitor} from "@capacitor/core"; +import {IS_WEBVIEW} from "common/hosting/constants"; + export function isAndroidWebView() { try { // Detect if Android bridge exists - return typeof (window as any).AndroidBridge?.isNativeApp === 'function'; + // return typeof (window as any).AndroidBridge?.isNativeApp === 'function'; + return Capacitor.isNativePlatform() || IS_WEBVIEW } catch { return false; } -} \ No newline at end of file +} + +export function isNativeMobile() { return isAndroidWebView() } \ No newline at end of file