Repository navigation
[url_launcher_android] doesn't open intent hyperlinks from in-app webview (without Custom Tabs) #106331
Copy link
Copy link
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listfound 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.1has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: url_launcherPlugin to launch external applicationsPlugin to launch external applicationspackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-androidOwned by Android platform teamOwned by Android platform teamtriaged-androidTriaged by Android platform teamTriaged by Android platform team
Description
If you use url_launcher on Android to open either a https link or mailto link everything works find.
However, if you open an https link that will have a button opening a mailto link, it fails.
Steps to Reproduce
Only on Android
- Open the website using
url_launcher, for exampleflutter.dev - Scroll down to
Presssection 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_SCHEME

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://flutter.dev'),
child: const Text('Open flutter.dev'),
),
),
),
);
}
}Logs
[✓] Flutter (Channel stable, 3.0.2, on macOS 12.4 21F79 darwin-arm, locale en-PL)
• Flutter version 3.0.2 at /Users/marcinszalek/flutter
• 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 31.0.0)
• Android SDK at /Users/marcinszalek/Library/Android/sdk
• Platform android-32, build-tools 31.0.0
• 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 at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] 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)
[✓] VS Code (version 1.67.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.40.0
[✓] Connected device (3 available)
• SM A528B (mobile) • R5CRA1FNLAX • android-arm64 • Android 12 (API 31)
• macOS (desktop) • macos • darwin-arm64 • macOS 12.4 21F79 darwin-arm
• Chrome (web) • chrome • web-javascript • Google Chrome 102.0.5005.115
[✓] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!
demo.mp4
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listfound 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.1has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: url_launcherPlugin to launch external applicationsPlugin to launch external applicationspackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-androidOwned by Android platform teamOwned by Android platform teamtriaged-androidTriaged by Android platform teamTriaged by Android platform team
Activity
[-]url_launcher_android doesn't open intent hyperlinks from webview[/-][+][url_launcher_android] doesn't open intent hyperlinks from webview[/+]exaby73 commentedon Jun 21, 2022
I can reproduce this in stable and master, with
url_launcher: 6.1.3.Screenshot
Code sample
flutter doctor -v(Stable)flutter doctor -v(Master)mrkim0425 commentedon Jun 22, 2022
i had same problem too today and fixed it by changing LaunchMode
code before

code after

only LaunchMode externalApplication worked for me
hope this case fixes
MarcinusX commentedon Jun 23, 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.sawirricardo commentedon Jul 4, 2022
1 remaining item
gnprice commentedon Aug 17, 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.[-][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)[/+]stuartmorgan-g commentedon 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.tirth-patel-nc commentedon May 15, 2025
Triage 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
stable (3.29.3) - flutter doctor -v
master (3.33.0-1.0.pre.83) - flutter doctor -v
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.
github-actions commentedon May 29, 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.