You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After a dynamic link has been handled in my App with opening a specific screen/article, the screen/article shows up spontaneously and continuously every 10 - 30 seconds Irregularly.
I guess that not a normal behavior, and I supposed that memory of the deeplink should be erased once it has been handled one time.
Any Idea of what is going wrong ?
A solution to fix it would be to force the deleting of the deeplink memory, but is possible ? How to do it ?
Please help
Here is my flutter doctor and my dynamicLinkHepler.dart
`Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.2.2, on macOS 11.4 20F71 darwin-x64, locale fr-FR)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.1)
[✓] VS Code (version 1.58.0)
[✓] Connected device (3 available)
• No issues found! Here is my class for Dynamic Links
import 'dart:async';
import 'package:firebase_dynamic_links/firebase_dynamic_links.dart';
import 'package:flutter/material.dart';
class DynamicLinkHelper {
initDynamicLinks() async {
FirebaseDynamicLinks.instance.onLink(onSuccess: (PendingDynamicLinkData dynamicLink) async {
final Uri deepLink = dynamicLink?.link;
if (deepLink != null) {
//NAVIGATE TO SPECIFIC SCREEN
}
}, onError: (OnLinkErrorException e) async {
print(e.message);
});
final PendingDynamicLinkData data = await FirebaseDynamicLinks.instance.getInitialLink();
final Uri deepLink = data?.link;
if (deepLink != null) {
// Navigator.pushNamed(context, deepLink.path);
print("Test deeplink: ${deepLink.path}");
}
}
Future handleDynamicLinks() async {
// 1. Get the initial dynamic link if the app is opened with a dynamic link
final PendingDynamicLinkData data = await FirebaseDynamicLinks.instance.getInitialLink();
// 2. handle link that has been retrieved
_handleDeepLink(data);
// 3. Register a link callback to fire if the app is opened up from the background using a dynamic link.
FirebaseDynamicLinks.instance.onLink(onSuccess: (PendingDynamicLinkData dynamicLink) async {
// 3a. handle link that has been retrieved
_handleDeepLink(dynamicLink);
}, onError: (OnLinkErrorException e) async {
print('Link Failed: ${e.message}');
});
}
void _handleDeepLink(PendingDynamicLinkData data) {
final Uri deepLink = data?.link;
if (deepLink != null) {
print('_handleDeepLink | deeplink: $deepLink');
//NAVIGATE TO SPECIFIC SCREEN
}
}
Future retrieveDynamicLink(BuildContext context) async {
try {
final PendingDynamicLinkData data = await FirebaseDynamicLinks.instance.getInitialLink();
final Uri deepLink = data?.link;
if (deepLink != null) {
//NAVIGATE TO SPECIFIC SCREEN
}
FirebaseDynamicLinks.instance.onLink(onSuccess: (PendingDynamicLinkData dynamicLink) async {
//NAVIGATE TO SPECIFIC SCREEN
});
} catch (e) {
print(e.toString());
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
After a dynamic link has been handled in my App with opening a specific screen/article, the screen/article shows up spontaneously and continuously every 10 - 30 seconds Irregularly.
I guess that not a normal behavior, and I supposed that memory of the deeplink should be erased once it has been handled one time.
Any Idea of what is going wrong ?
A solution to fix it would be to force the deleting of the deeplink memory, but is possible ? How to do it ?
Please help
Here is my flutter doctor and my dynamicLinkHepler.dart
`Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.2.2, on macOS 11.4 20F71 darwin-x64, locale fr-FR)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.1)
[✓] VS Code (version 1.58.0)
[✓] Connected device (3 available)
• No issues found!
Here is my class for Dynamic Links
import 'dart:async';
import 'package:firebase_dynamic_links/firebase_dynamic_links.dart';
import 'package:flutter/material.dart';
class DynamicLinkHelper {
}
Future handleDynamicLinks() async {
}
void _handleDeepLink(PendingDynamicLinkData data) {
final Uri deepLink = data?.link;
if (deepLink != null) {
print('_handleDeepLink | deeplink: $deepLink');
}
Future retrieveDynamicLink(BuildContext context) async {
try {
final PendingDynamicLinkData data = await FirebaseDynamicLinks.instance.getInitialLink();
final Uri deepLink = data?.link;
}
}
`
Beta Was this translation helpful? Give feedback.
All reactions