Firebase introduces Dynamics Links which is migrated from Firebase invites. Dynamic Link is a deep-linking platform of firebase for the developers to share any content or your application with others by creating a short link. We can also use it as promotional campaigns and also for referrals.
Dynamic link follow the basic pattern when someone tapped on a link:
- If the application installed in the mobile it will redirect to the Application.
- If the application is not installed in the mobile then it will redirect to the description web page from where you can open the application on the App Store/Play store.
- If you open the application on desktop or laptop then it will redirect to the respective website that we will mention while creating the dynamic link.
For example, you have a shopping application and recently you see a product that your friend is searching and then you share it with your friend. when he/she tapped the link you share, it will open the application and if he/she didn’t have the application then he/she will be redirected to the store. And if he/she opens the link on desktop or laptop then it will redirect to the website of the application.
Today we will discuss how can we manage it on firebase console and implement it in our application. so, let’s get started.
Creating Dynamic Link
let’s get started, Dynamic link has 2 parts Prefix and Suffix. First, we create the Prefix for the dynamic link.
Open the Console of the firebase and make a project if you don’t have any. then open the project and redirect it to the Dynamic Link section where you can see the get started view.
Press the get started button and then a popup appears where you can write the domain name of the prefix make sure that your prefix should be unique and relevant to the application (For batter practice use application name ). and then click finish it will take some time to finalize and then redirect to the dashboard.
Press the get started button and then a popup appears where you can write the domain name of the prefix make sure that your prefix should be unique and relevant to the application (For batter practice use application name ). and then click finish it will take some time to finalize and then redirect to the dashboard.
On the dashboard left top, you can see the prefix of the deep link. Now we confirm that our prefix is created fine or not for that we will use apple-app-site-association to confirm it:
https://appnamee.page.link/apple-app-site-association
if your app is connected with apple-app-site-association then it will show reference to your app's App Store ID and bundle ID and if you didn't configure the setting then app's App Store ID and bundle ID will be not shown.
{"applinks":{"apps":[],"details":[{"appID":"1234567890.com.example.ios","paths":["/*"]}]}}
Now its time to create a dynamic link under the prefix we just created. After creating prefix you have to create suffix to make a complete dynamic link. we can generate a dynamic link in two different ways.
- Manually.
- Programmatically.
1. Manually
If you have a static dynamic link that you don’t want to edit before sharing the link so its good practice to make it manually e.g you want to share your application. You can also track the number of clicks. We can create the dynamic link manually from console but when we create a dynamic link from console it can’t be editable but only properties of it. If you try to edit it by self then it will not work and shows an error so make sure if you are making it manually then make it properly.
For creating dynamic link manually follow this article.
2. Programatically
If you want to share some content of your application for that the prefix is not fixed and you surely need a random dynamic link that you will create on runtime for that you will create dynamic link programmatically.
Top comments (0)