-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
flutter/packages
#9993Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterhas partial patchThere is a PR awaiting someone to take it across the finish lineThere is a PR awaiting someone to take it across the finish linep: 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 specificallyteam-androidOwned by Android platform teamOwned by Android platform teamtriaged-androidTriaged by Android platform teamTriaged by Android platform team
Description
Use case
I am implementing OAuth2.0 (for Amazon Alexa, but this could apply for any OAuth provider with similar setup), the provider recommends that the deeplink/applink should be used to authorize, if the app is installed in the device and as a fallback use webview/in-app browser tab.
For iOS the use case is solved with universalLinksOnly option in launch. For Android canLaunch returns true since the applink is of scheme https. Alternative could be to use PackageManager to check if app is installed on device - this requires additional entries in <queries> in AndroidManifest.xml but this is not recommended by Android for just url launch use case.
Proposal
- add optional
onlyNonBrowser(defaults tofalse) argument tocanLaunchmethod - for android: if
onlyNonBrowseristrue, addFLAG_ACTIVITY_REQUIRE_NON_BROWSERflag to intent beforeresolveActivityis called docs
Caveats
- As far as I know this can be only implemented for android platform.
bradsb, santa112358, hunterwilhelm, MrCsabaToth, TiffApps and 2 more
Metadata
Metadata
Assignees
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterhas partial patchThere is a PR awaiting someone to take it across the finish lineThere is a PR awaiting someone to take it across the finish linep: 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 specificallyteam-androidOwned by Android platform teamOwned by Android platform teamtriaged-androidTriaged by Android platform teamTriaged by Android platform team