[android_intent_plus] [Bug]: category.APP_BROWSER not working
Platform
10
Plugin
android_intent_plus
Version
3.1.1
Flutter SDK
3.0.1
Steps to reproduce
AndroidIntent(
action: 'action_view',
data: url,
//category: 'android.intent.category.APP_BROWSER',
).launchChooser('Choose your browser');
This opens the chooser with all the apps that can open url, notably the web browsers.
However, specifying the category leads to no app showing up in the chooser.
It probably is a problem with missing arguments for example, but I'm honestly not sure what I'm supposed to add here.
Logs
No error.
Flutter Doctor
[√] Flutter (Channel stable, 3.0.0, on Microsoft Windows [version 10.0.19044.1706], locale fr-BE)
• Flutter version 3.0.0 at C:\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision ee4e09cce0 (4 weeks ago), 2022-05-09 16:45:18 -0700
• Engine revision d1b9a6938a
• Dart version 2.17.0
• DevTools version 2.12.2
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at C:\Users\USER\AppData\Local\Android\sdk
• Platform android-31, build-tools 30.0.2
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
• All Android licenses accepted.
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.1.6)
• Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
• Visual Studio Community 2022 version 17.1.32421.90
• Windows 10 SDK version 10.0.19041.0
[√] Android Studio (version 2021.2)
• Android Studio at C:\Program Files\Android\Android Studio
• 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+7-b1504.28-7817840)
[√] VS Code, 64-bit edition (version 1.67.1)
• VS Code at C:\Program Files\Microsoft VS Code
• Flutter extension version 3.40.0
[√] Connected device (2 available)
• SM A750FN (mobile) • 32005e294fcf368d • android-arm64 • Android 10 (API 29)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [version 10.0.19044.1706]
[√] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!
Have you considered using https://pub.dev/packages/url_launcher instead?
@miquelbeltran Yes of course, but it allows choosing the "Always" option, and the app is used to open links from a website in a different UI, basically. So if you choose "Always" with the app for example, url_launcher won't open the link with another app, which is what I'm looking for.
Take a look at the Android documentation: https://developer.android.com/reference/android/content/Intent#CATEGORY_APP_BROWSER
Used with ACTION_MAIN to launch the browser application. The activity should be able to browse the Internet.
Does it require action_main, not action_view, right? Can you try that?
ACTION_MAIN specifies that no data is transmitted to the app, so this isn't what I'm looking for here ; and even then, the result is the exact same (at least visually : no apps are shown in the chooser).
Is what you are trying to accomplish working on Android natively? Have you tried that? What I mean, is that if this is an OS issue/question rather than a plugin issue, you will get better support on other places like StackOverflow.
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days