Rosário P. Fernandes
Rosário P. Fernandes

Reputation: 11316

Is it possible to add custom parameters to Firebase Dynamic Links?

So I'm developing a game for Android and I'm using Firebase for Authentication, to store user data, etc...

And now, I want to provide the user a way to share their score with their friends, so they can try to beat that score. I was thinking about sharing a dynamic link, and when the second user gets the link, the game would just start from that checkpoint.

But to do that, I would need to send a few data: the level Number, the first user's score, the first user's name.

I checked the documentation here and I saw that I can add some custom campaign parameters. But can I add those other parameters I need? If yes, How do I do it?

Upvotes: 2

Views: 2786

Answers (2)

Ben.Slama.Jihed
Ben.Slama.Jihed

Reputation: 534

build Uri :

builder.scheme("https").authority("deepLink_from_firebase").appendQueryParameter("Param", Param_value).build();

and set that on setDeepLink()

Upvotes: 1

Alex Bauer
Alex Bauer

Reputation: 13613

To do this with Firebase, you would need to either encode all the custom data in the URL, or store it in your backend and use the URL as a key to retrieve the stored values. It's possible, but not as intuitive as you're hoping.

I would recommend investigating Branch.io (full disclosure: I am on the Branch team). The Branch service is free, does store an unlimited number of custom parameters with each link (exactly as you described), and interfaces perfectly with the other Firebase functions you are currently using. Branch links are used for this by many of the top apps in the world, including Airbnb, Pinterest, Tinder, and many others.

Upvotes: 0

Related Questions