Skip to content

[url_launcher] Edge to Edge issue on android 15+ with _launchUrl(url, mode: LaunchMode.inAppWebView) #170333

Open

Description

@ArunendraTiwari

Plugin version:
url_launcher: ^6.3.1

Platform version:
Android 15 (API level 34, Developer Preview or Beta)

Issue:
When launching a webpage using url_launcher in LaunchMode.inAppWebView, the bottom part of the web content gets clipped or hidden behind the system gesture navigation bar on Android 15. This causes UI elements like "Accept Cookies" or "Reject" buttons (commonly displayed in sticky footers on websites) to be inaccessible or partially visible.

Steps to reproduce:
Launch a Flutter screen that uses url_launcher to open a webpage in an in-app web view:

Code:

  1. launchUrl(
    Uri.parse('https://example.com'),
    mode: LaunchMode.inAppWebView,
    );

  2. Run the app on a device or emulator running Android 15.

  3. Observe that the website renders, but the bottom UI (e.g., cookie banners) is partially hidden under the system gesture bar.

Expected results

The web content should respect system UI insets and padding.
Bottom elements such as cookie banners or sticky buttons should be fully visible and tappable.

Actual results

Web content does not fully respect safe area insets.
Bottom elements are clipped or obstructed by Android's gesture navigation system.

Code sample

Code sample
launchUrl(
  Uri.parse('https://example.com'),
  mode: LaunchMode.inAppWebView,
);

Screenshots or Video

Screenshots / Video demonstration

Image

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.29.3, on macOS 14.6.1 23G93 darwin-x64, locale en-IN) [937ms]
    • Flutter version 3.29.3 on channel stable at /Users/arutiwar4/FlutterSDK/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ea121f8859 (9 weeks ago), 2025-04-11 19:10:07 +0000
    • Engine revision cf56914b32
    • Dart version 3.7.2
    • DevTools version 2.42.3

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0) [4.1s]
    • Android SDK at /Users/arutiwar4/Library/Android/sdk
    • Platform android-35, build-tools 35.0.0
    • ANDROID_HOME = /Users/arutiwar4/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
      This is the JDK bundled with the latest Android Studio installation on this machine.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.1) [2.4s]
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16B40
    • CocoaPods version 1.16.2

[✓] Chrome - develop for the web [35ms]
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.1) [34ms]
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)

[✓] VS Code (version 1.96.4) [31ms]
    • VS Code at /Users/arutiwar4/Downloads/Sdk/Visual Studio Code.app/Contents
    • Flutter extension version 3.102.0

[✓] Connected device (3 available) [7.9s]
    • iPhone 15 (mobile) • 06D40C13-8A36-43B5-9A88-4C0C9B565AB1 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-17-5 (simulator)
    • macOS (desktop)    • macos                                • darwin-x64     • macOS 14.6.1 23G93 darwin-x64
    • Chrome (web)       • chrome                               • web-javascript • Google Chrome 137.0.7151.69

[✓] Network resources [8.8s]
    • All expected network resources are available.

• No issues found!

Activity

  1. changed the title [-]Edge-to Edge support for android 15+[/-] [+][url_launcher] Edge-to Edge issue on android 15+[/+] on Jun 10, 2025
  2. changed the title [-][url_launcher] Edge-to Edge issue on android 15+[/-] [+][url_launcher] Edge to Edge issue on android 15+ with _launchUrl(url, mode: LaunchMode.inAppWebView)[/+] on Jun 10, 2025
  3. added
    in triage
    on Jun 11, 2025
  4. darshankawar commented on Jun 11, 2025

    @darshankawar
    Member

    @ArunendraTiwari
    Starting from Android 15 , app automatically displays in edge-to-edge mode. If the issue you are reporting is related to the bottom system navigation bar, can you try to use below code to check if it helps ?

    SystemChrome.setSystemUIOverlayStyle(
        const SystemUiOverlayStyle(
          systemNavigationBarColor: Colors.transparent,
        ),
      );
    

    Also, you can also opt-out of edge to edge as mentioned in the migration guide that also you can try and check if it helps further in your case or not.

  5. added
    waiting for response
    on Jun 11, 2025
  6. ArunendraTiwari commented on Jun 13, 2025

    @ArunendraTiwari
    Author

    Thanks for the suggestion! I tried setting systemNavigationBarColor to transparent using:
    SystemChrome.setSystemUIOverlayStyle(
    const SystemUiOverlayStyle(
    systemNavigationBarColor: Colors.transparent,
    ),
    );
    While this does make the navigation bar visually transparent on Android 15 but getting same output in Webview. If somehow it will make it transparent the main issue still persists: the "Accept Cookies" / "Reject" buttons shown at the bottom of the webpage are not tappable. It seems like the touch input is blocked in the area where the system gesture bar resides.

    Could this be related to WebView not handling window insets or gesture exclusion zones properly in edge-to-edge mode? Is there a way to explicitly add padding or inset handling so that the interactive content isn't obscured or blocked?

    I have also applied changes of migration guide.

  7. removed
    waiting for response
    on Jun 13, 2025
  8. darshankawar commented on Jun 16, 2025

    @darshankawar
    Member

    @ArunendraTiwari Can you try with wrapping the webview with SafeArea to check if it helps ?

  9. added
    waiting for response
    on Jun 16, 2025
  10. ArunendraTiwari commented on Jun 16, 2025

    @ArunendraTiwari
    Author

    Hi @darshankawar ,
    However, since we're using the url_launcher plugin to open the URL via launchUrl() with LaunchMode.inAppWebView, we're not directly embedding a WebView widget in our widget tree. As such, we don't have access to wrap the WebView in a SafeArea, since it's handled internally by the plugin.

    launchUrl( Uri.parse('https://example.com'), mode: LaunchMode.inAppWebView, );

  11. removed
    waiting for response
    on Jun 16, 2025
  12. darshankawar commented on Jun 17, 2025

    @darshankawar
    Member

    Thanks for the update @ArunendraTiwari
    I tried the below code with latest stable and master versions with Android 15 emulator but don't see the reported behavior.

    void main() {
      runApp(const MyApp());
    }
    
    class MyApp extends StatelessWidget {
      const MyApp({super.key});
    
      @override
      Widget build(BuildContext context) {
        return MaterialApp(
          title: 'URL Launcher',
          theme: ThemeData(
            primarySwatch: Colors.blue,
          ),
          home: _launchInWebView()
        );
      }
    
      _launchInWebView() {
        launchUrl(Uri.parse('https://www.flutter.dev'),
        mode: LaunchMode.inAppWebView
        );
      }
    }
    
    Image

    Can you try the same as above with latest stable version on affected device / emulator to check if reported behavior still occurs or not ?

  13. added
    waiting for response
    on Jun 17, 2025
  14. ArunendraTiwari commented on Jun 17, 2025

    @ArunendraTiwari
    Author

    Hi @darshankawar ,

    Thanks for checking on the latest stable and master versions.

    To clarify, the issue seems to occur specifically on Android 15 devices that have a bottom navigation bar (i.e., software navigation buttons at the bottom). On devices without a bottom navigation bar (such as those using gesture navigation or with hardware buttons), we do not observe the edge-to-edge rendering issue.

    It appears that the presence of the bottom navigation bar is a key factor in reproducing the problem. Could you please test the behavior on an Android 15 emulator or device with a bottom navigation bar enabled to see if the issue is reproducible in that scenario?

  15. removed
    waiting for response
    on Jun 17, 2025
  16. 15 remaining items

  17. reidbaker commented on Jun 18, 2025

    @reidbaker
    Member

    Given this is web content dependent doesn't that mean that the issue is on the website and how it handles insets?

  18. pathconnected commented on Jun 18, 2025

    @pathconnected
    Contributor

    @reidbaker I don't think websites usually can access those platform informations? Sorry if I got it wrong.
    FWIW I saw that the web view is being opened in a second activity, which is fullscreen. My understanding was that the webview should have a container around with appropriate paddings, otherwise the website area will be covered by system bars etc, especially starting with android 15. But I'm not capable to implement a solution with integration tests.

  19. added
    a: platform-views
    P2
    triaged-android
    on Jun 24, 2025
  20. self-assigned this
    on Jun 24, 2025
  21. stcojo commented on Oct 5, 2025

    @stcojo

    This issue only happens on Android 15+ devices which use button based navigation (which have a navigation bar).

    You can workaround this issue by doing the following:

    1. Create a custom theme in your styles.xml
    <style name="EdgeFixTheme" parent="@style/Theme.AppCompat.Light.NoActionBar">
            <item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
            <item name="android:windowTranslucentStatus">false</item>
            <item name="android:windowTranslucentNavigation">false</item>
            <item name="android:statusBarColor">@android:color/transparent</item>
            <item name="android:navigationBarColor">@android:color/transparent</item>
            <item name="android:windowLightStatusBar">true</item>
            <item name="android:windowLightNavigationBar">true</item>
            <item name="android:windowDrawsSystemBarBackgrounds">true</item>
            <item name="android:fitsSystemWindows">true</item>
        </style>
    
    1. In your AndroidManifest.xml override the theme used for the URL launcher activity with the one created above
    <activity 
                android:name="io.flutter.plugins.urllauncher.WebViewActivity"
                android:theme="@style/EdgeFixTheme"
                tools:replace="android:theme"
                android:exported="false"/>
    
    1. Close the app completely and rebuild
  22. ArunendraTiwari commented on Oct 6, 2025

    @ArunendraTiwari
    Author

    Sure, Thanks
    Will check and update you.

  23. flutter-triage-bot commented on Oct 28, 2025

    @flutter-triage-bot

    This issue is assigned to @ash2moon but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks!

  24. added
    ⏳
    on Oct 28, 2025
  25. fhihung commented on Nov 7, 2025

    @fhihung
  26. removed
    ⏳
    on Nov 19, 2025
  27. Ann3388p commented on May 21, 2026

    @Ann3388p

    "I've investigated this issue and found that WebViewActivity doesn't handle window insets, causing the WebView to extend behind the system navigation bar on Android 15+.
    Fix: Added ViewCompat.setOnApplyWindowInsetsListener in WebViewActivity.onCreate() to apply proper padding based on system window insets.
    I've opened a PR with this fix: [link to your PR]"

  28. reidbaker commented on May 21, 2026

    @reidbaker
    Member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2a: platform-viewse: OS-version specificfound in release: 3.32found in release: 3.33has reproducible stepsp: url_launcherpackageplatform-androidteam-androidtriaged-android

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions