Repository navigation
[url_launcher_android] doesn't open intent hyperlinks from in-app webview (without Custom Tabs) #106331
Description
Activity
- changed the title
[-]url_launcher_android doesn't open intent hyperlinks from webview[/-][+][url_launcher_android] doesn't open intent hyperlinks from webview[/+]on Jun 21, 2022 - addedin triagePresently being triaged by the triage teamPresently being triaged by the triage team
on Jun 21, 2022 I can reproduce this in stable and master, with
url_launcher: 6.1.3.Code sample
import 'package:flutter/material.dart'; import 'package:url_launcher/url_launcher.dart'; void main() { runApp(_MyApp()); } class _MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( home: Scaffold( body: Center( child: ElevatedButton( onPressed: () => launchUrl(Uri.parse('https://flutter.dev')), child: const Text('Open flutter.dev'), ), ), ), ); } }
flutter doctor -v(Stable)[✓] Flutter (Channel stable, 3.0.2, on macOS 12.4 21F79 darwin-arm, locale en-US) • Flutter version 3.0.2 at /Users/nabeelparkar/fvm/versions/stable • Upstream repository https://github.com/flutter/flutter.git • Framework revision cd41fdd495 (13 days ago), 2022-06-08 09:52:13 -0700 • Engine revision f15f824b57 • Dart version 2.17.3 • DevTools version 2.12.2 [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc4) • Android SDK at /Users/nabeelparkar/Library/Android/sdk/ • Platform android-33, build-tools 33.0.0-rc4 • ANDROID_SDK_ROOT = /Users/nabeelparkar/Library/Android/sdk/ • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 13.4.1) • Xcode at /Applications/Xcode.app/Contents/Developer • CocoaPods version 1.11.3 [✓] Chrome - develop for the web • CHROME_EXECUTABLE = /Applications/Brave Browser.app/Contents/MacOS/Brave Browser [✓] Android Studio (version 2021.2) • 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 11.0.12+0-b1504.28-7817840) [✓] IntelliJ IDEA Ultimate Edition (version 2022.1.2) • IntelliJ at /Applications/IntelliJ IDEA.app • Flutter plugin version 68.1.4 • Dart plugin version 221.5787.37 [✓] VS Code (version 1.68.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.42.0 [✓] Connected device (2 available) • macOS (desktop) • macos • darwin-arm64 • macOS 12.4 21F79 darwin-arm • Chrome (web) • chrome • web-javascript • Brave Browser 102.1.39.122 [✓] HTTP Host Availability • All required HTTP hosts are available • No issues found!flutter doctor -v(Master)[✓] Flutter (Channel master, 3.1.0-0.0.pre.1317, on macOS 12.4 21F79 darwin-arm, locale en-US) • Flutter version 3.1.0-0.0.pre.1317 on channel master at /Users/nabeelparkar/fvm/versions/master • Upstream repository https://github.com/flutter/flutter.git • Framework revision d4929bc828 (6 hours ago), 2022-06-20 20:09:05 -0400 • Engine revision ceac23d7a9 • Dart version 2.18.0 (build 2.18.0-190.0.dev) • DevTools version 2.14.0 [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc4) • Android SDK at /Users/nabeelparkar/Library/Android/sdk/ • Platform android-33, build-tools 33.0.0-rc4 • ANDROID_SDK_ROOT = /Users/nabeelparkar/Library/Android/sdk/ • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 13.4.1) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 13F100 • CocoaPods version 1.11.3 [✓] Chrome - develop for the web • CHROME_EXECUTABLE = /Applications/Brave Browser.app/Contents/MacOS/Brave Browser [✓] Android Studio (version 2021.2) • 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 11.0.12+0-b1504.28-7817840) [✓] IntelliJ IDEA Ultimate Edition (version 2022.1.2) • IntelliJ at /Applications/IntelliJ IDEA.app • Flutter plugin version 68.1.4 • Dart plugin version 221.5787.37 [✓] VS Code (version 1.68.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.42.0 [✓] Connected device (2 available) • macOS (desktop) • macos • darwin-arm64 • macOS 12.4 21F79 darwin-arm • Chrome (web) • chrome • web-javascript • Brave Browser 102.1.39.122 [✓] HTTP Host Availability • All required HTTP hosts are available • No issues found!- addedp: url_launcherPlugin to launch external applicationsPlugin to launch external applicationshas reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onfound in release: 3.0Found to occur in 3.0Found to occur in 3.0found in release: 3.1Found to occur in 3.1Found to occur in 3.1platform-androidAndroid applications specificallyAndroid applications specificallyand removedin triagePresently being triaged by the triage teamPresently being triaged by the triage team
on Jun 21, 2022 It's not the same case. I don't want to launch
mailtodirectly fromurlLauncher. I want to launch ahttpslink which will open a webview in which there will be clickablemailtolink.Reacted by Fernando and Taehyun Park- addedP2Important issues not at the top of the work listImportant issues not at the top of the work list
on Jun 23, 2022 1 remaining item
- addedpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.
on Jul 5, 2023 - addedteam-androidOwned by Android platform teamOwned by Android platform teamtriaged-androidTriaged by Android platform teamTriaged by Android platform team
on Jul 8, 2023 One way to fix this issue would be for us to switch to opening URLs in a Chrome custom tab rather than our own webview screen:
Specifically, I reproduced this issue, and then went and opened the same web page in a Chrome custom tab in a non-Flutter app. There, the same
mailto:link successfully opened a mail client, ready to compose a message to the given recipient.- changed the title
[-][url_launcher_android] doesn't open intent hyperlinks from webview[/-][+][url_launcher_android] doesn't open intent hyperlinks from in-app webview (without Custom Tabs)[/+]on Aug 31, 2023 Anyone affected by this issue can
flutter pub upgradeto pick upurl_launcher_android6.1.0 or later, and in supported configurations in-app mode will use Custom Tabs instead of the previous webview, which won't have this issue.Reacted by Greg PriceTriage Report
I was not able to reproduce the issue using the provided code sample on either the
stable (3.29.3)ormaster (3.33.0-1.0.pre.83)channels.The "Press" hyperlink isn't available on the Flutter website, so I used a different site to reproduce the issue.
url_launcher - 6.3.1
Screen.Recording.2025-05-15.at.4.54.17.PM.mov
Code Sample
import 'package:flutter/material.dart'; import 'package:url_launcher/url_launcher_string.dart'; void main() { runApp(_MyApp()); } class _MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( home: Scaffold( body: Center( child: ElevatedButton( onPressed: () => launchUrlString( 'https://www.rapidtables.com/web/html/mailto.html', ), child: const Text('Open'), ), ), ), ); } }
stable (3.29.3) - flutter doctor -v
[✓] Flutter (Channel stable, 3.29.3, on macOS 15.4.1 24E263 darwin-arm64, locale en-IN) [970ms] • Flutter version 3.29.3 on channel stable at /Users/tirthpatel/Development/flutter_stable/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision ea121f8859 (4 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 36.0.0) [855ms] • Android SDK at /Users/tirthpatel/Library/Android/sdk • Platform android-36, build-tools 36.0.0 • 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 21.0.6+-13355223-b631.42) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 16.3) [556ms] • Xcode at /Applications/Xcode.app/Contents/Developer • Build 16E140 • CocoaPods version 1.16.2 [✓] Chrome - develop for the web [9ms] • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2024.3) [9ms] • 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 21.0.6+-13355223-b631.42) [✓] VS Code (version 1.99.3) [8ms] • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension can be installed from: 🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter [✓] Connected device (3 available) [5.5s] • macOS (desktop) • macos • darwin-arm64 • macOS 15.4.1 24E263 darwin-arm64 • Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin • macOS 15.4.1 24E263 darwin-arm64 • Chrome (web) • chrome • web-javascript • Google Chrome 135.0.7049.115 [✓] Network resources [559ms] • All expected network resources are available. • No issues found!master (3.33.0-1.0.pre.83) - flutter doctor -v
[✓] Flutter (Channel master, 3.33.0-1.0.pre.83, on macOS 15.4.1 24E263 darwin-arm64, locale en-IN) [1,952ms] • Flutter version 3.33.0-1.0.pre.83 on channel master at /Users/tirthpatel/Development/flutter_master/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision eb0712fd4c (70 minutes ago), 2025-05-14 21:11:17 -0700 • Engine revision eb0712fd4c • Dart version 3.9.0 (build 3.9.0-117.0.dev) • DevTools version 2.46.0 [✓] Android toolchain - develop for Android devices (Android SDK version 36.0.0) [880ms] • Android SDK at /Users/tirthpatel/Library/Android/sdk • Emulator version 35.4.9.0 (build_id 13025442) (CL:N/A) • Platform android-36, build-tools 36.0.0 • 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 21.0.6+-13355223-b631.42) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 16.3) [620ms] • Xcode at /Applications/Xcode.app/Contents/Developer • Build 16E140 • CocoaPods version 1.16.2 [✓] Chrome - develop for the web [8ms] • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2024.3) [7ms] • 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 21.0.6+-13355223-b631.42) [✓] VS Code (version 1.100.0) [7ms] • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.110.0 [✓] Connected device (2 available) [5.6s] • macOS (desktop) • macos • darwin-arm64 • macOS 15.4.1 24E263 darwin-arm64 • Chrome (web) • chrome • web-javascript • Google Chrome 136.0.7103.94 [✓] Network resources [864ms] • All expected network resources are available. • No issues found!I’ll go ahead and close this issue. Feel free to reopen it if you're still encountering problems or can provide additional reproduction steps.
Reacted by Greg Price- addedr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version
on May 15, 2025 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, including the output of
flutter doctor -vand a minimal reproduction of the issue.- locked as resolved and limited conversation to collaborators
on May 29, 2025



If you use
url_launcheron Android to open either ahttpslink ormailtolink everything works find.However, if you open an
httpslink that will have a button opening amailtolink, it fails.Steps to Reproduce
Only on Android
url_launcher, for exampleflutter.devPresssection in the footer and click it (it hasmailto:hyperlink)Expected results:
I expect a mailing app to be opened
Actual results:

An error page with error:
ERR_UNKNOWN_URL_SCHEMECode sample
Logs
demo.mp4