llfbandit / app_links Goto Github PK
View Code? Open in Web Editor NEWAndroid App Links, Deep Links, iOs Universal Links and Custom URL schemes handler for Flutter.
Home Page: https://pub.dev/packages/app_links
License: Apache License 2.0
Android App Links, Deep Links, iOs Universal Links and Custom URL schemes handler for Flutter.
Home Page: https://pub.dev/packages/app_links
License: Apache License 2.0
> <dict>
> <key>com.apple.developer.associated-domains</key>
> <array>
> <string>applinks:farmatodoven.page.link</string>
> <string>applinks:farmatodo.com.ve</string>
> <string>activitycontinuation:farmatodo.com.ve</string>
> <string>webcredentials:farmatodo.com.ve</string>
> <string>applinks:farmatodo.onelink.me</string>
> <string>applinks:ios-dot-ng-ftd.appspot.com</string>
> <string>activitycontinuation:ios-dot-ng-ftd.appspot.com</string>
> <string>webcredentials:ios-dot-ng-ftd.appspot.com</string>
> <string>applinks:www.farmatodo.com.ve</string>
> <string>applinks:*.farmatodo.com.ve</string>
> </array>
> </dict>
command line
https://www.farmatodo.com.ve/producto/111002864-removedor-valmy-original-vidrio-50-m
Hello, when I run a sample project, access sample://foo/#/book/hello-deep-linking through a browser, and open the already-started program, it doesn't have any changes sent.
Hi
When my app is started from an app link, how do I return to the calling app or browser?
I have tried with url_launcher
_alReferer
is a back-link I get from a uri parameter sent with the app link
launch(
_alReferer,
forceSafariVC: false,
forceWebView: false,
webOnlyWindowName: '_self',
);
But that does not work as expected. I go back to the calling browser, but the link is opened in a new tab.
I want to return to the same tab as the app link call originated from...
Is there another way to go back to the calling app or browser (same tab)?
Thanks
Gerd
Generally when I'm implementing app links, I'm interested in all incoming messages regardless of app state.
It would be nice to have a single stream that combines both initial and ongoing links to make it easier to implement this (I believe) common use case.
Here's my implementation as an extension:
extension AppLinkX on AppLinks {
Stream<Uri> get allLinks async* {
final initial = await getInitialAppLink();
if (initial != null) yield initial;
yield* uriLinkStream;
}
}
This is ultimately not an issue with the plugin but Slack Android app send ACTION_VIEW with URIs like content://com.Slack.fileprovider/slack_files/xxx.jpg
. The URI hostname has capitalized S
in it and Dart's Uri constructor make the hostname lower-case during processing it.
As the result, the app receives content://com.slack.fileprovider/slack_files/xxx.jpg
and it cannot resolve the content with the lower-cased URI.
I need some workaround not to use Uri.parse
or... something special to handle such problematic URI.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
We have the requirement that we want to disable the deeplinks (weblinks) in our app for a particular workflow.
We can precisely identify the scenario when we want to disable the deeplinks temporarily and enable it back.
But we could not find way to do it.
On native app, we could do something like this:
ComponentName act = new ComponentName(Android.App.Application.Context, "com.company.ActivityForDeeplink");
//enabling
Android.App.Application.Context?.PackageManager?.SetComponentEnabledSetting(act, ComponentEnabledState.Enabled, ComponentEnableOption.DontKillApp);
//disabling
Android.App.Application.Context?.PackageManager?.SetComponentEnabledSetting(act, ComponentEnabledState.Disabled, ComponentEnableOption.DontKillApp);
But since we are including the library at common code level only, and have no activity for deeplinks explicitly, we could not find the way to do it.
Links were looking to disable are : "http/https://"
We want custom urls schemes ,like : "://redirect", to work as expected that app will receive callbacks via handleincominglinks etc.
Does it related to
[ ] App Links (Android)
[ X ] Deep Links (Android)
[ ] Universal Links (iOS)
[ ] or Custom URL schemes? (iOS)
Any idea how to disable or enable the deeplinks at codelevel.
Thanks for an awesome plugin! ๐
I have app_links
installed and working. When I do the following command in the Terminal, it correctly opens my Flutter app to the correct go_router
route:
xcrun simctl openurl booted "myapp://tools"
But what I don't get is how to make it so when I tap on a push notification for my app, it reads the url
property of my notification payload so that it goes to that URL:
'aps': {
'alert': {
'title': title,
'body': message,
},
'sound': 'PopDing.aiff',
'url': 'myapp://tools',
}
As far as I can tell, when you do this with a native iOS or Mac app, you have to manually parse the url
property and act on it.
Does app_links
capture my notification payload somehow so I can use it to redirect to the correct page in my app?
So Far everything works fine on Android and iOS but when it comes to windows when you lunch the app from URL Scheme the getInitialAppLink() is Always return null .
to summarise it's the same issue like #7 but for windows platform
Edit : even with the example app if you start the app from an url scheme getInitialAppLink will always return null on windows platform
I encountered this issue when trying to add support for app links to our flutter app
This happens when app is stopped and cold started with an app link
On Android getInitialAppLink() returns the incoming link and we use that to open a route inside the app
On iOS, however, additionally onAppLink() gets called, as if two separate links were arriving
This is very confusing, leading to navigation mixups and errors
Please advise
Describe the bug
Windows build process fails after updating from 3.3.0 to 3.4.1. Reverting back to 3.3.0 fixes the issue.
The only logs I get:
Building Windows application...
Build process failed.
Does it related to
[ ] App Links (Android)
[ ] Deep Links (Android)
[ ] Universal Links (iOS)
[ ] or Custom URL schemes? (iOS)
[x] Windows
Does the example project work?
[ ] Yes
[ ] No
[x] Irrelevant here
Did you fully read the instructions for the targeted platform before submitting this issue?
Uploaded your files to webserver, HTTPS, direct connection, scheme pattern setup, ...
[ ] Yes
[ ] No
[ ] Irrelevant here
I cannot seem to get the universal links to work in MacOS. It works fine in an IOS simulator but MacOS just opens up Safari and never asks to open in app or anything else. Any ideas?
module app_links not found
thanks for this amazing plugin.
i meet one problem that i use another plugin(wechat_kit) that it also need to handle application open.
i see that code in AppLinks is always return true, it will stop wechat_kit to share.
should we provide a method to get which scheme should we handle? or handleLink has a return value?
public func application(
_ application: UIApplication,
open url: URL,
options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
handleLink(url: url)
return true
}
we had app_link and other share plugin, the problem is that app_link can't know whether url had handled.
refer issue:
please check it if you have a time, maybe we can improve it, thanks
On iOS cold boot getInitialAppLink or even getLatestAppLink always return null;
final uri = await appLinks.getInitialAppLink() ?? await appLinks.getLatestAppLink();
// uri is always null on iOS
any fix on this issue?
I'm using app_links
version 3.2.0 in my Windows application.
I use app_links
to do a login in my external application.
The link contains authorization token and other information.
Authorization token is very long and the total length is more than 2048 characters.
If the link to my application is more than 2048 application starts, but _appLinks.uriLinkStream.listen
does not called.
I used the example application to try it.
That link works, but is I add any single chars the application stop to work sample://foo/#/book/hello-world2?user_id=2&access_token=9xXTrme1et7IJHV1xfCQ2EoCN8KWf0INgIwSqpZBUuWbBSBT13Lm0plLCtDPVsaA38oM8QugxJ7gQH8poc4BFw6IIeISuidDQ9JVVcoh5UCPJpjyPhfVyh1panxJ7lSOiKkGdHfIez6oLov4c13vQMAOPBMujikzDQL096lOgg2gWJI1psyU7LSVeekXiBbXioJZ4PxzTxs4z3qVp3GkIvH4qtSAQnVGDVpHcKf5a5BYUiT8nAtcjVoyF9xcZrl9Uf9GFRSAYMA1K9zh6ojtRsMfuAPgBW4ZhzKa3wFgKmPRMkgVwyaa1G563YUlH9J724ZRC7tNsiVRrjGr4gyGMqgvd0N6L7v4e6ov4mEt8dAfePeRdaxeoHI0c5qTToJOnnJChSyZLh8tVnwp79NsmzMu7EKrOEM6cf98kEN2RLBr0ENqpWy1CZUG2ijAcM3K6cKhUYkQ9JYWq5oV20RL39KpsVAUh2KvbjrfW1Gg32Kpqs2K0mQ69ZJpcLZYhV4jRQzxvBTEiSeVlRWHZvfStfmm6wZ3bEDEilqqYlK5jzCUGK53BvdIHMdTnQSkrwnMvahod8ATK0df52JbsDGp2EI1ZmBAiBz87HPRc38RZY8wpalRZ1DnYIgGVLf4AUZTfwz4ZYbLZdTbGPPRNndPLlXOJxXcxzepDKR2uh7vdS26UJSLe3JEzyPvjHZqWeToQkve5gsdGBQT4EPcwWiWZlUodFY4N8zzgmaqM6PekEA9duOnsZ8IHin5B9LJUm9et9D71SiYBSOWRPMfCY9rY10b3DxmYoGUm7rfSb5isaJU9KrjWLBMhJkzCyFCNx5YT7CxXSgeWGL7R5P65UceaocwZzVEyzuu01p57aKKFCk9x7mAxei2GxEQOtVAVT44dLW29gaC0atERaodL7f9PyQarf6xs66eeGYt1c5gQk1sd3PJ0eunirsXuGdn3dqu7frk47GgRwxJwEcQnbWA4VrHxmqKBCb8vGRcpG3xESOSz1kMYFl85VirFJG5NBk2p0Evbahf0fosOdBMLG4jjVqthXTzsDwc6BdKh4ESlJmcHizr9y4Rjo7tyqxef0gCzobOXvM8h6JZKdtFLaUdMKu9GsiYFLdjjmJhVCx1SEg2njC9OgL8Ld92coJyRTowVhTY7OMxtcICVKsrP8Nem6igNqLERCcIEEqtMpts062ZSvnIiF2IEz9sqxGNbbPrny2tuWhdp2JpduGXNdWuwZeOXElcnNy4YRQeieH2fuxF4rJnjZG6iDNLtpUY8QRj5JjrY1dFdteWi8kQbSXvT61HscBrEqZteRa4Gmay58qaKBmY1YjXwHdeyff1M0AqnnSRCWEodxqeeRNnV8tcy0ZDenbuZzuYYPzgX1WHMQdTvyy2NNlSL0gXshzYRFsvUVBD4MlojGxeuTDmXLqWTAWV5e2tVL7kMkHch26GnDVSJDdar4dRJSDPhHW9aTFh1FF6uXRNgyGymEOEdzHVu95p0fJSym993w3gPltfnczaSOIIQdOcyzM4AFU3RSFvyX1CKUPFZCkXIxM5h4mJ3yuiJgqTOpBTEdK57T8vxQWMprSmgANL8o8gG3qhnC9cHRexbmEBn999c7AYHoWX8G9DwmepPl9F1uMGhHgjkXXNECN35AOLZQDh9hzvDOOfx8OwkpoWbzMODGQjOb05B2hrj5pRewOt9Wt6zeEJ9I9Y6tYbCcuwUCIGJ8dvhYueWj1gWm7crgEcOwKyV4RFiQ9nd3SxMH8FNxkWazlZERlPLFg9CGNb4yhxf620jlpmWAkfVMo22CJuIM0MflcGmjFT6piOEIFSZHIVV70uZGj7NxVWJ2Zko6C4iQpwEnr9VvGsYMIhAUOLf1tt5TGQWZoMn8UMr6TWIRzjpUAo9MqYwmZmc4mP0ydzot6o1Nw4hGownIA0357m9w7XqcwqZbdSMwnHM5TbVeZqP96wVgpH11FdxXWFCWPe72OQymiSATkyjS
There is some workaround to use it?
Tanks.
I'm using your plugin for a login flow where I redirect the user back to my app. So when I open the browser I start listening for URL like this
openBowser();
final uri = await AppLinks().allUriLinkStream.first;
print('Got $uri');
The problem is that when I call this code twice, that I get directly the result of the first call. I already asked some Flutter developers and it seems that you need to provide this functionality.
I tested this on MacOS, but I think that should be also on Windows.
I saw that there is a readme file in each different project directory, but it is important to have a repo readme as well.
This way we can explain to the developers what to expect in which folder and it is much nicer to arrive at to the repo with a readme than just empty bottom.
Is support for these platforms on the roadmap?
Hi everyone,
Currently we've got a problem with our Flutter app and Applinks. The app can be opened via deep links and we can display content based on these links. However, we have a big problem with outgoing links in the app.
Our app accepts app all incoming URL's and handles them inside the app. If the URL is not recognized in the app we use URLUtils.launchURLExternal(url)
to go to the web instead of app. The only issue is that makes the applink infinite loop because we go back to a page that sends the page to the app.
Is there a way/workaround to prevent it from infinite looping
// app.dart
StreamSubscription? _linkSubscription;
Future _handleIncomingLinks() async {
final appLinks = sl();
final uri = await appLinks.getInitialAppLink();
// Handle link when app is in warm state (front or background)
_linkSubscription = appLinks.uriLinkStream.listen((uri) {
sl().handle(uri);
});
// Handle initial link if app was in cold state (terminated)
if (uri != null) {
await sl().handle(uri);
}
}
// AppLinkService
Future handle(Uri uri) async {
try {
if (uri.path.endsWith('.html')) {
// PDP
await appLinkProductService.handlePDP(uri: uri);
} else if (regExpCatagoryPage.hasMatch(uri.path)) {
// Categories
await appLinkAssortmentService.handleAssortment(uri: uri);
} else {
await crashlytics.log('Unable to handle applink uri $uri');
return launchURLExternal(uri);
}
} catch (e, s) {
await crashlytics.recordError(e, s);
return launchURLExternal(uri);
}
}
Future launchURLExternal(Uri uri) async {
await URLUtils.launchURLExternal(uri.toString());
}
We have an app that uses App Link for deep linking (its an Ecommerce app) and we don't want the user to see the option of selecting our app to open a particular link when they click on our site's url in their browser.
Instead we want the user to open that link in the browser as it is and once they land on the site, the user may open any link that leads to our app.
Is this possible ? if it is then how can we achieve it in App_Links as I can't seem to find an option in the documentation.
Thanks for your hard work.
Here is my situation.
Initial link works well. But uriLinkStream
never provide events. But it still shows logs like below..
"iOS handleLink: myapp://myapp.com/chats"
"iOS handleLink: myapp://myapp.com/chats"
... and finally as a workaround i am using 2.2.2 for now with similar interface..
final deepLinkStreamController = StreamController<Uri>.broadcast();
final appLinks = AppLinks(onAppLink: (uri, str) {
deepLinkStreamController.add(uri);
});
...
deepLinkStreamController.stream.listen((link) {
...
});
Anyone has same issue?
[android]
I'm having trouble getting the app link when the app is closed and a link is clicked in the browser.
the application opens, but the initial string is always null.
Its my code on main()
AppLinks links = AppLinks();
String? initialLink = await links.getInitialAppLinkString();
if (initialLink != null) {
DeepLinksController().handleLink(initialLink);
}
links.stringLinkStream.listen((url) {
DeepLinksController().handleLink(url);
});
Device: Android
The following code causes an exception to be thrown
final _applinks = AppLinks();
final _initialRoute = await _applinks.getInitialAppLink();
method_channel_applinks.dart throws no such method at
@override
Future<String?> getInitialAppLinkString() async {
final link = await _method.invokeMethod(_getInitialAppLinkMethod);
return link.isNotEmpty ? link : null;
}
Excellent work on this package :)
Describe the bug
My use case is users click on a link with a unique query parameter that will be used during sign up for my app. This operation uses getInitialAppLink()
. Everything seems to be working in development when the app is installed on my device. The link can open the app and get the data with no problem so I try to put it on the App Store. Without the app installed, I click on the link, go to the App Store page, download it, and click continue. When I get to the point where getInitialAppLink()
should be called, it doesn't get the data. But then when I close the app and open it again with the link, everything seems to work. This issue seems to be related to #14.
Does it related to
[ ] App Links (Android)
[ ] Deep Links (Android)
[X] Universal Links (iOS)
[ ] or Custom URL schemes? (iOS)
Does the example project work?
[ ] Yes
[ ] No
[X] Irrelevant here
Info.plist
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>Bundle ID</string>
<key>CFBundleURLSchemes</key>
<array>
<string>com.bundle.id</string>
</array>
</dict>
</array>
The package looks nice and the links are nice.
However it is not really clear how to catch the intent coming in, as the commands in the README have no surrounding body. Does that mean the final _appLinks = AppLinks(
is defined in the main.dart on the outside, in an initState, etc.
Having a full example and more verbose documentation could support in this.
android build gradle has problen
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app_links:compileDebugJavaWithJavac'.
> Could not resolve all files for configuration ':app_links:debugCompileClasspath'.
> Could not find localbroadcastmanager-1.0.0.jar (androidx.localbroadcastmanager:localbroadcastmanager:1.0.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/androidx/localbroadcastmanager/localbroadcastmanager/1.0.0/localbroadcastmanager-1.0.0.jar
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 6s
The build failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetifier to solve the incompatibility.
Building plugin app_links...
Running Gradle task 'assembleAarRelease'...
FAILURE: Build failed with an exception.
* What went wrong:
Task 'assembleAarRelease' not found in root project 'app_links'.
* Try:
Run gradlew tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 805ms
Exception: The plugin app_links could not be built due to the issue above.
Hi! Thank you for your work in developing this package, it is very helpful!
Might be related to #19 and #32.
This issue occurs only on iOS.
When i open my app with the link (iampet://app.iampet.io/feed/point-shop), the app open but the initialLink
is null.
Clicking on the same link while the app is running trigger the uriLinkStream
properly.
FYI: I open those links from Slack.
What i tried :
main.dart
with the example main.dart
, same problemAppDelegate.swift
with the example one, same problemI noticed that the problem is that AppDelegate.application(app, url, options)
is never triggered.
import UIKit
import Flutter
import AppTrackingTransparency
import firebase_dynamic_links
import NaverThirdPartyLogin
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
NSLog("[petbb] AppDelegate didFinishLaunchingWithOptions()")
GeneratedPluginRegistrant.register(with: self)
// to show foreground push notif with `flutter_local_notifications`
if #available(iOS 10.0, *) {
UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate
}
// below code is based on https://stackoverflow.com/a/47432726/7943785
if let url = launchOptions?[UIApplication.LaunchOptionsKey.url] as? URL { //Deeplink
NSLog("[petbb] AppDelegate didFinishLaunchingWithOptions() test1 = " + url.absoluteString)
}
else if let activityDictionary = launchOptions?[UIApplication.LaunchOptionsKey.userActivityDictionary] as? [AnyHashable: Any] { //Universal link
for key in activityDictionary.keys {
if let userActivity = activityDictionary[key] as? NSUserActivity {
if let url = userActivity.webpageURL {
NSLog("[petbb] AppDelegate didFinishLaunchingWithOptions() test2 = " + url.absoluteString)
}
}
}
}
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
// open tracking popup (mandatory since ios 14)
override func applicationDidBecomeActive(_ application: UIApplication) {
NSLog("[petbb] AppDelegate applicationDidBecomeActive()")
if #available(iOS 14, *) {
ATTrackingManager.requestTrackingAuthorization { (status) in }
}
}
// handle different dynamic links (firebase, kakao, naver login, applinks)
override func application(
_ app: UIApplication,
open url: URL,
options: [UIApplication.OpenURLOptionsKey: Any]
) -> Bool {
NSLog("[petbb] AppDelegate application() = " + url.absoluteString)
// use for kakao share (XXXXXX replace my token)
if url.absoluteString.hasPrefix("XXXXXXXXXXXXX") {
return super.application(app, open: url, options: options)
}
// use for naver login (XXXXXX replace my token)
if url.absoluteString.hasPrefix("XXXXXXXXXXXX"){
return NaverThirdPartyLoginConnection.getSharedInstance().application(app, open: url, options: options)
}
// use for firebase
if DynamicLinks.dynamicLinks().dynamicLink(fromCustomSchemeURL: url) != nil {
return true
}
NSLog("[petbb] AppDelegate application() went until the end")
return super.application(app, open: url, options: options)
}
override func application(
_ app: UIApplication,
continue userActivity: NSUserActivity,
restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void
) -> Bool {
NSLog("[petbb] AppDelegate restorationHandler()")
return super.application(app, continue: userActivity, restorationHandler: restorationHandler)
}
}
And here are the logs generated from it
Link opened from terminated state | Link opened while app is running |
---|---|
![]() |
![]() |
As you can see, the url can be founded in launchOptions
but not in openLink
.
From what i can see online, people tends to suggest to use SceneDelegate
Another quick solution for me would be to be able to save manually the link in SwiftAppLinksPlugin
.
Maybe by exposing SwiftAppLinksPlugin.sharedInstance()
and adding a setter ? I don't have much knowledge on swift development but i will probably try to go in this direction in my fork for the moment.
Does it related to
[ ] App Links (Android)
[ ] Deep Links (Android)
[ ] Universal Links (iOS)
[x] Custom URL schemes? (iOS)
Does the example project work?
[x] Yes
[ ] No
[x] Irrelevant here
Did you fully read the instructions for the targeted platform before submitting this issue?
Uploaded your files to webserver, HTTPS, direct connection, scheme pattern setup, ...
[ ] Yes
[ ] No
[x] Irrelevant here
Describe the bug
A clear and concise description of what the bug is.
final appLink = await _appLinks.getInitialAppLink();
_linkSubscription = _appLinks.uriLinkStream.listen((uri) {
myMethod(context, url: appLink ?? uri);
});
when I did hot reload it calls deep link again!!!
Does it related to
[ ] App Links (Android)
[ ] Deep Links (Android)
[o] Universal Links (iOS)
[ ] or Custom URL schemes? (iOS)
Does the example project work?
[o] Yes
[ ] No
[ ] Irrelevant here
Did you fully read the instructions for the targeted platform before submitting this issue?
Uploaded your files to webserver, HTTPS, direct connection, scheme pattern setup, ...
[ ] Yes
[o] No
[ ] Irrelevant here
apple-app-site-association file content
{
"applinks": {
"apps": [],
"details": [{
"appID": "TEAMID+BUNDLE_ID",
"paths": ["*"]
}]
}
}
iOS version: 14.1
Do you support applinks passed through Google Play when installing the app?
We're using Adjust DeepLinking platform to generate links, but don't receive the applink on first run after install.
I think it's described in https://developer.android.com/google/play/installreferrer/library
Hi, I have a service that starts my deeplink once the login page widget is started in the init state, by the time the user presses the link they type their new credentials and take them to login again, when I redirect to login it doesn't let me and it never goes from there, if I put another page where the deeplink does not start this behavior does not happen
PD: I'm Using gorouter packague
Hello @llfbandit,
I am trying to implement deep links in flutter web assuming web support is added in V2.2.0 and calling getInitialAppLink() only but getting below exception.
Uncaught MissingPluginException(No implementation found for method getInitialAppLink on channel com.llfbandit.app_links/messages).
Does it work with Facebook app links?
URLs like this format https://example.com/test?id=123&name=hello&anotherParam=world
is only showing https://example.com/test?id=123
Can't access all query parameters. Getting only the first one.
Hi. I can reproduce the issue with the example project.
This impacts the user experience as they do not expect to be taken to a deep link page when opening the app from scratch. Surely there must be a way to clear the deep link history.
Hey, Custom Schemes are working well in the windows app. But How to use the HTTPS scheme for the windows app?
//pubspec.yaml file
dependencies:
app_links: ^3.4.0
How to reproduce:
cd macos
rm Podfile.lock
pod install --repo-update
Result:
[!] No podspec found for app_links
in Flutter/ephemeral/.symlinks/plugins/app_links/macOS
Thanks
Describe the bug
If the app wake up, it can work. But I killed the app it can't work.
final appLinks = AppLinks();
// Subscribe to all events when app is started.
// (Use allStringLinkStream to get it as [String])
appLinks.allUriLinkStream.listen((uri) {
// Do something (navigation, ...)
onUrlSchemeUpdate(context, url: uri);
});
void onUrlSchemeUpdate(BuildContext context, {required Uri url}) {
// bla bla ...
}
Does it related to
[ ] App Links (Android)
[o ] Deep Links (Android)
[o ] Universal Links (iOS)
[ ] or Custom URL schemes? (iOS)
Does the example project work?
[o ] Yes
[ ] No
[ ] Irrelevant here
Did you fully read the instructions for the targeted platform before submitting this issue?
Uploaded your files to webserver, HTTPS, direct connection, scheme pattern setup, ...
[ ] Yes
[o ] No
[ ] Irrelevant here
I'm using Android 10, i setup custom schema (water://) and the schema is working perfect, i can open my app from other app by this schema.
The problem is when i redirect to other app with some schema (in my case clal://), then the appLinks.allUriLinkStream.listen
is calling again for some reason, with the last URI (water://).
I'm using url_launcher package to open other app, here's a snippet of code:
Here's a screenshot of what happened when the launchUrl
is call (line 288 in the screenshot above):
Does it related to
[ ] App Links (Android)
[X] Deep Links (Android)
[ ] Universal Links (iOS)
[ ] or Custom URL schemes? (iOS)
Does the example project work?
[ ] Yes
[ ] No
[X] Irrelevant here
Did you fully read the instructions for the targeted platform before submitting this issue?
YES
Uploaded your files to webserver, HTTPS, direct connection, scheme pattern setup, ...
[X] Yes
[ ] No
[ ] Irrelevant here
hello dear @llfbandit
thanks for this excellent package
please add support flutter web
I have an app that can be started from a link on iOS and Android.
When the app is minimized, i can start it with a link, and the getLatestAppLink catch the link correctly.
Problem:
When the app is closed (aka not minimized) on Android the getInitialAppLink does not return the link. This problem is only on Android. On iOS it works.
While working with the iOS emulator (I don't have a real iOS device, unfortunately), I noticed that onAppLink
isn't triggered the first time a deep link is used, but only from the second time onward. Note that in the given example, this behaviour is noticeable only if the app is already running, when the first deep link is used.
The issue appears in version 2.2.1 of the package and persists in version 2.2.2. Things are fine in version 2.2.0 though.
pubspec.yaml
app_links: ^2.2.2
Info.plist
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>example</string>
<key>CFBundleURLSchemes</key>
<array>
<string>app</string>
</array>
</dict>
</array>
main.dart
import 'dart:math';
import 'package:app_links/app_links.dart';
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) => const MaterialApp(home: Page(1));
}
class Page extends StatelessWidget {
const Page(this.index, {Key? key}) : super(key: key);
final int index;
@override
Widget build(BuildContext context) {
AppLinks(onAppLink: (_, link) {
print('received $link');
Navigator.push(
context,
MaterialPageRoute(builder: (_) => Page(index + 1)),
);
});
return Scaffold(
appBar: AppBar(
title: Text('Page $index'),
backgroundColor:
Colors.primaries[Random().nextInt(Colors.primaries.length)],
),
);
}
}
terminal command: xcrun simctl openurl booted app://example
The problem isn't only appearing with the command - opening the deep link through the browser has the same behaviour for example.
_appLinks.allUriLinkStream.listen((uri) {
// Do something (navigation, ...)
});
will return the url (https://myapp.com?page=$pageName&id=$id&country=$country), with the data passed in it on(on Android),
but on iOS will return the short url (https//:myapp.page.link/...).
how to get the iOS to return the same url as Android
Would be great to have Linux support!
Hi,
I'm currently using your library for handle firebase dynamic link.
I have detected differents behaviours depending of Android version :
I would like to get always the original value of the link, can you help me ?
Thanks in advance,
Regards
Describe the bug
I want to use the deep links in the Login Screen and the universal Links inside the app ( Home screen for example )
The deep links in the login screen were working fine, but once i added another instance of AppLinks in Home Screen,
the listeners seems not working as before
i receive the URI in the console :
handleIntent: (Action) android.intent.action.VIEW
handleIntent: (Data) https://XXXXX/...................
But the method listen it doesn't dispatch the message received ( it listens only the first time or when i rerun the project ) :
// Handle link when app is in warm state (front or background)
_linkSubscription = _appLinks.allUriLinkStream.listen((uri) {
if (kDebugMode) {
log('[Login] onAppLink: $uri');
}
openAppLink(uri);
});
A clear and concise description of what the bug is.
Does it related to
[x] App Links (Android)
[x] Deep Links (Android)
[x] Universal Links (iOS)
[ ] or Custom URL schemes? (iOS)
Does the example project work?
[ ] Yes
[ ] No
[x] Irrelevant here
Did you fully read the instructions for the targeted platform before submitting this issue?
Uploaded your files to webserver, HTTPS, direct connection, scheme pattern setup, ...
[x] Yes
[ ] No
[ ] Irrelevant here
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.