llfbandit / app_links

Android App Links, Deep Links, iOs Universal Links and Custom URL schemes handler for Flutter.
https://pub.dev/packages/app_links
Apache License 2.0
218 stars 80 forks source link

uriLinkStream listener does not receive any events #170

Open tylertzeyang opened 9 hours ago

tylertzeyang commented 9 hours ago

Describe the bug

The link is able to open my app, but the handling inside uriLinkStream listener is never hit after I've updated to the latest version (6.3.2).

void listenToDeepLinks() {
    logger.d("listenToDeepLinks() started");
    if (_streamSubscription != null) {
      _streamSubscription?.cancel();
    }
    if (!kIsWeb) {
      // It will handle app links while the app is already started - be it in
      // the foreground or in the background.
      _streamSubscription = _appLinks.uriLinkStream.listen((Uri? uri) {
        if (uri != null) {
          _handleDeepLink(uri);
        }
        logger.d('listenToDeepLinks() Received URI: $uri');
      }, onError: (Object err) {
        logger.e('listenToDeepLinks() Error occurred: $err');
      });
    }
  }

Does it related to

[ ] App Links (Android)
[ ] Deep Links (Android)
[/ ] Universal Links (iOS)
[ ] or Custom URL schemes? (iOS)

Does the example project work?

[/ ] 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
[ ] No
[ /] Irrelevant here

BeezBeez commented 8 hours ago

Hello ! I confirm I have the same problem on Windows. Custom URL Scheme is registered, my app window go back to foreground but the uri and stringLinkStream does not receive any events.

@tylertzeyang Does it was working for you on previous versions ?