[ad_1]
5948
What are dynamic hyperlinks? Dynamic hyperlinks are the hyperlinks whose conduct you’ll be able to decide- you’ll study this within the subsequent part. Firebase Dynamic Hyperlinks can behave in a different way or equally on a number of platforms- Android, iOS, Internet platform- primarily based on what you want. It should present you the content material that’s applicable for that platform. You can too arrange Firebase Dynamic Hyperlinks to alter their conduct relying on whether or not or not your person has your app put in. These hyperlinks can be utilized for varied functions particularly advertising and marketing campaigns in your new purposes.
Being an iOS and Android app growth firm, we now have developed purposes that use firebase dynamic hyperlinks. As an example, we developed the PayNowlink cost app that generates dynamic hyperlinks to finish transactions with none human contact. We determined to put in writing a firebase dynamic hyperlink tutorial to assist Android builders in addition to cellular app startups to grasp what dynamic hyperlinks are, how they are often created, and the way they can be utilized.
How Do Firebase Dynamic Hyperlinks Work?
Firebase Dynamic hyperlinks are created to supply the most effective expertise to your app customers. You’ll be able to create a firebase dynamic hyperlink in varied methods. You should utilize the Firebase console, an iOS or Android Builder API, a REST API, or kind a URL by including dynamic hyperlink parameters to a website that’s particular to your app. These parameters specify the conduct of the hyperlink upon opening primarily based on the person’s platform and whether or not or not your app is put in.

When a person opens a dynamic hyperlink on an iOS or Android gadget, they’re taken on to the linked content material in your native app. Within the case of a desktop browser, they’re taken to the equal content material of the linked content material in your web site. For customers who don’t have your app put in, you’ll be able to ship them to your web site, or take them to the play retailer, or present them interstitial describing the advantages of your app earlier than you’re taking them to the app retailer for a smoother transition.
Now that you understand what dynamic hyperlinks are and the way they work, it’s time to see the way to create dynamic hyperlinks in firebase. Under we now have step-by-step tutorials together with firebase dynamic hyperlinks examples to programmatically create dynamic hyperlinks for Android in addition to iOS platforms.
Tutorial: The way to Create a Dynamic Hyperlink for Android?
Half 1: To Create Dynamic Hyperlinks
Step 1: The dynamic hyperlink creation beings by making a undertaking with an empty exercise

Step 2: Configure undertaking identify, package deal identify, and minimal SDK model

Step 3: Create a Firebase undertaking and add a JSON file to your undertaking
Step 4: Add following dependencies to your App Gradle
- implementation 'com.google.firebase:firebase-dynamic-links-ktx:19.1.0'
- implementation 'com.google.firebase:firebase-analytics-ktx:17.4.4'
Step 5: Go hyperlink parameters
val invitationLink =
"http://www.yopmail.com/?invitedby=${refferCode.worth}" //Go parameters in hyperlink as question parameters
Step: 5.1 Lengthy Dynamic Hyperlink
Generate Dynamic hyperlink utilizing the next operate
val dynamicLink = Firebase.dynamicLinks.dynamicLink {
hyperlink =
Uri.parse(invitationLink)
domainUriPrefix = "https://spaceo.web page.hyperlink"
// Open hyperlinks with this app on Android
androidParameters {
// The versionCode of the minimal model of your app that may open the hyperlink.
// If the put in app is an older model, the person is taken to the Play Retailer to improve the app.
minimumVersion = 1
}
// Open hyperlinks with com.instance.ios on iOS
// iosParameters("com.instance.ios") { }
}
val dynamicLinkUri = dynamicLink.uri // get Hyperlink
Step 5.2: Brief Firebase Dynamic Hyperlink
val shortLinkTask = Firebase.dynamicLinks.shortLinkAsync {
hyperlink =
Uri.parse(invitationLink)
domainUriPrefix = "https://spaceo.web page.hyperlink"
androidParameters {
// The versionCode of the minimal model of your app that may open the hyperlink.
// If the put in app is an older model, the person is taken to the Play Retailer to improve the app.
minimumVersion = 1
}
// Set parameters
// ...
}.addOnSuccessListener { end result ->
// Brief hyperlink created
val shortLink = end result.shortLink
//val flowchartLink = end result.previewLink
this.shortLink.worth = shortLink.toString()
}.addOnFailureListener {
// Error
// ...
Log.d("log_tag", "==> ${it.localizedMessage}", it)
this.shortLink.worth = it.localizedMessage
}
Half 2: To Obtain Dynamic Hyperlinks
Step 1: Add an intent filter in exercise tag as beneath
<exercise
android:identify=".DeepLinkReceiveActivity"
android:screenOrientation="portrait">
<intent-filter>
<motion android:identify="android.intent.motion.VIEW" />
<class android:identify="android.intent.class.DEFAULT" />
<class android:identify="android.intent.class.BROWSABLE" />
<knowledge
android:host="www.yopmail.com"
android:scheme="http" />
<knowledge
android:host="www.yopmail.com"
android:scheme="https" />
</intent-filter>
</exercise>
Step 2: Use the beneath code to get knowledge out of your exercise.
Firebase.dynamicLinks
.getDynamicLink(intent)
.addOnSuccessListener(this) { pendingDynamicLinkData ->
// Get deep hyperlink from end result (could also be null if no hyperlink is discovered)
var deepLink: Uri? = null
if (pendingDynamicLinkData != null) {
deepLink = pendingDynamicLinkData.hyperlink
Log.d("TAG", "==> ${deepLink.toString()}")
if (deepLink?.getBooleanQueryParameter("invitedby", false) == true)
binding.linkData = deepLink.getQueryParameter("invitedby")
}
// Deal with the deep hyperlink. For instance, open the linked
// content material, or apply promotional credit score to the person's
// account.
// ...
Need To Create An Android Software?
Validate your app concept and get a free quote.
Demo for Android App Firebase Deep Linking
This demo reveals how one can create firebase dynamic hyperlinks in android and get a particular referral code by opening a particular dynamic hyperlink. This can be utilized to advertise provides in your app.

Use Circumstances of Dynamic Hyperlinks
Listed here are among the ways in which you need to use dynamic hyperlinks.
-
Changing net customers to app customers
The difficulty with commonplace deep hyperlinks is that they don’t survive the app set up course of. If a person clicks on a deep hyperlink and is directed to the app set up web page, all the unique linked content material will get misplaced. Dynamic hyperlinks have overcome this drawback. So, in case your person installs your app by clicking on a dynamic hyperlink, all that data is accessible when your person opens the app for the primary time.
-
Advertising Campaigns
You should utilize Firebase Dynamic Hyperlink for advertising and marketing campaigns, from e-mails to social media to banner ads to even QR codes. You’ll be able to know which campaigns are getting you the very best high quality customers. You can too give your customers a custom-made first-time expertise primarily based on the marketing campaign that introduced them there.
So, if the customers put in your music app since you confirmed them an commercial for classical music, you may make certain your app takes them to the classical music part the primary time they open your app.
-
Sharing
Any dynamic hyperlink, Firebase or not, is nice for sharing too. The customers can use such hyperlinks to share recipes, hyperlinks to their favourite degree on a recreation, and even coupon codes. In truth, dynamic hyperlinks are the know-how that powers Firebase invitations.
-
Analytics
As dynamic hyperlinks are Firebase merchandise you’ll be able to see their stats instantly by way of the Firebase Console. You will discover out how many individuals clicked on a hyperlink or use Firebase Analytics to seek out out which of your customers first opened your app by way of a specific hyperlink.
Conclusion
So, we hope that now even you’ll be able to create Android firebase dynamic hyperlink in your software with none problem. You can too seek advice from this GitHub supply code for Android if you happen to want extra particulars.
In case, you might have any queries whereas implementing this code throughout app growth, be happy to ask us. We all the time respect constructive suggestions, you may also tell us your views on this tutorial and assist us enhance. If it’s essential to rent Android builders in your undertaking, contact us.
Helpful useful resource
[ad_2]
