Skip to main content

Firebase Dynamic Links

It helps your application to be installed from your dynamic links from anywhere on the internet.

Requirements#

  1. WooStore Pro application version v1.12.0 or above.

Key Features implemented#

The features implemented in WooStore Pro with firebase dynamic links include the following:

  1. Share products information using Firebase dynamic links. Whenever any user will share a product's information when Firebase Dynamic Links is enabled in the application, the receiver will be taken to the exact product screen in the application. Even if the user does not have the application installed, the link will prompt the user to install the application and then take them to the exact product details screen.

  2. Share the application link itself to download the application.

Setup#

You need to follow some setup steps if you want to enable Firebase Dynamic Links to work in your application.

  1. In the Firebase Console, open the Dynamic Links section.
  • Accept the terms of service if you are prompted to do so.
  1. Take note of your project's Dynamic Links URL prefix, which is displayed at the top of the Dynamic Links page. A Dynamic Links URL prefix looks like https://YOUR_SUBDOMAIN.page.link.

iOS integration#

  1. Open the Runner.xcodeproj in Xcode located in woostore_pro / lib / ios directory.
  2. In the Info tab of your iOS app's Xcode project, scroll down to the URL Types section and add your bundle id of your iOS application in the URL Schemes field. This is the same bundle id that you created while settings up the application in Renaming the package.

Firebase dynamic link 1

  1. In the Capabilities tab of your app's Xcode project, edit the Associated Domains value with your firebase dynamic link url prefix.
applinks:your_sub_domain.page.link
caution

Make sure that you edit the value above and pattern correctly. If there is a problem with the above setup then your dynamic links will not work on iOS devices.

Firebase dynamic link 2

Android integration#

To open the android application when your dynamic link is clicked then you need to add your dynamic link url prefix in AndroidManifest.xml file.

  1. Open the AndroidManifest.xml from woostore_pro / android / app / src / main / AndroidManifest.xml in android studio.

  2. Scroll down to the following section:

<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:scheme="https"
android:host="your-host.page.link" />
</intent-filter>

Approximate line number is: 35 - 42.

  1. Replace the your-host.page.link with your dynamic link url prefix you got from Firebase Dynamic Links dashboard.

Application Configuration#

  1. Open the config.dart file from woostore_pro / lib / constants / config.dart in android studio.

  2. Scroll down to FirebaseDynamicLinksConfig class at the bottom.

  3. Edit the following variables:

  • uriPrefix - From Firebase Dynamic Link dashboard
  • androidPackageName
  • iOSBundleId
  • appStoreId - You need to add your app store id for iOS to open the links in the application and not in a browser.

You can now use Firebase Dynamic Links in your application.