-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android specific options (useWideViewPort, loadWithOverviewMode, supportZoom, builtInZoomContros, displayZoomControls) not working on apk release #280
Comments
after a couple of time to cater with this issue, I just get a workaround to solve this, when building a release build of apk, pass also the I got the following debug lot when enabled the debug log option in WebView, and it is only happened in release build but not debug build.
hope it may help you |
I just use AndroidInAppWebViewOptions : Successfully run in debug mode,but fail in |
This issue is stale and has been automatically closed because it has been open for more than 365 days with no activity. Please reopen a new issue if you still have it. |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug and a minimal reproduction of the issue. |
Environment
**Flutter version: v1.12.13+hotfix.7, on Microsoft Windows [Version 10.0.17763.973]
**Plugin version: Flutter plugin version 43.0.1 on Android Studio 3.5
**Android version: Android 9 (API 28)
**iOS version: N/A
**Xcode version: N/A
**Device information: SM J400M • 42006eb568b2a543 • android-arm • Android 9 (API 28)
Description
The above mentioned android specific options work fine on the debug version of the app. On the release version, however, neither of those options work (seems to be unavailable).
Expected behavior: For example, the web page should be displayed in overview mode, with a desktop-like view.
Current behavior: the web page is displayed in its original size, bigger than the screen size of the webview.. In addition, zoom support is not available so it is not possible to fit size.
Steps to reproduce
.
.
.
@OverRide
Widget build(BuildContext context) {
data = ModalRoute.of(context).settings.arguments;
return Scaffold(
appBar: AppBar(
title: Text(
'any text...',
style: GoogleFonts.indieFlower(),
),
elevation: 15.0,
),
body: InAppWebView(
initialUrl: data['url'],
initialHeaders: {},
initialOptions: InAppWebViewWidgetOptions(
crossPlatform: InAppWebViewOptions(
preferredContentMode: InAppWebViewUserPreferredContentMode.DESKTOP,
),
android: AndroidInAppWebViewOptions(
useWideViewPort: true,
loadWithOverviewMode: true,
supportZoom: true,
builtInZoomControls: true,
displayZoomControls: true,
),
),
onWebViewCreated: (InAppWebViewController controller) {
webView = controller;
},
),
);
}
The text was updated successfully, but these errors were encountered: