BIS Tech
BIS Tech

Reputation: 19424

firebase dynamic link for web users

Is it possible to create a dynamic link for web users? currently, we are using only for Android and Ios. If the user click a link on his laptop we need to redirect to web site

and also need to pass userId and bookId to the link to the web also. And this create an Flutter project.

No need to create link on Flutter project. Is it possible to create on manullay?

  Future<Uri> createBookLink(String userId,String bookId) async {
    Uri dynamicUrl;
    String packageName = 'packageName';
    String appStoreId = 'apple store id';
    String uriPrefix = 'https://...page.link';
  
    final DynamicLinkParameters parameters = DynamicLinkParameters(
        uriPrefix: uriPrefix,
        link: Uri.parse('$uriPrefix/book?id=$userId&bookId=$bookId'),
        androidParameters: AndroidParameters(packageName: packageName),
        iosParameters: IosParameters(
          bundleId: packageName,
          appStoreId: appStoreId,
        ));
    dynamicUrl = await parameters.buildUrl();
    return dynamicUrl;
  }

Upvotes: 0

Views: 795

Answers (1)

Cleanbeans
Cleanbeans

Reputation: 676

Yes it is possible to create a link manually and state the web destination. You can handle this by setting the Other platform parameters the ofl property of the link. Check the doc's out they go into all the necessary details.

Upvotes: 2

Related Questions