5

Dynamic links work great for 98% of our users. However, there are still a group of users which have difficulty with them or do not know how to use them.

I want to add a feature which would let users paste their link into the app, and then we extract the data from the link and handle it normally. This will also serve as a backup for when the links are down or misbehaving. It will also allow our customer service team to get data from a link when customers share them with us.

The problem is, there doesn't seem to be a way to manually pass in a dynamic link to retrieve the dynamic data.

Does anyone know how this can be achieved?

James
  • 543
  • 5
  • 14

1 Answers1

1

Here is my attempt at your question.

I am assuming what you mean by the dynamic data is the underlying deeplink along with the parameters associated with the deeplink.

void dynamicLinkToDeepLink(String dynamicLinkString) async {
    final details = await FirebaseDynamicLinks.instance.getDynamicLink(Uri.parse(dynamicLinkString));
    // your deep link can be accessed as follows
    details!.link;
  }

You have to safeguard the above code as you see fits when you use it. You will have to wrap FirebaseDynamicLinks.instance..... with a try catch block and you will also have to check if the value of the returned link is not null before acccessing details!.link

rashidotm
  • 392
  • 2
  • 12