8
votes

I have created a Firebase dynamic link, ex:

dynamic link: https://my.dynamic.link
deep link: https://my.deep.link

When someone visits that dynamic link it will either open my app if it's installed or open Google Play to install my app.

I'm not creating dynamic links using the android app, but I need to add parameters to that same dynamic link, ex:

https://my.dynamic.link/?p1=a&p2=b
https://my.dynamic.link/?p3=c
https://my.dynamic.link/?p5=e&p6=f

Now what I want is to retrieve the full dynamic link (not the deep link) within my android application. Firebase docs gives a proper way to retrieve the deep link. That's not what I want.

FirebaseDynamicLinks.getInstance()
    .getDynamicLink(getIntent())
    .addOnSuccessListener(this, new OnSuccessListener<PendingDynamicLinkData>() {
        @Override
        public void onSuccess(PendingDynamicLinkData pendingDynamicLinkData) {
            if (pendingDynamicLinkData != null) {
                pendingDynamicLinkData.getLink(); // --> https://my.deep.link 

                /*
                   what I want is the dynamic link with parameters
                   https://my.dynamic.link/?p1=a&p2=b
                */
            }
        }
    }
);

Is there a way to achieve this?

1
Did you solve it? If yes, oculdn't you say how?alectogeek
@alectogeek No, unfortunately I haven't found a way to achieve this.Roshana Pitigala

1 Answers

0
votes

Get all links not possible, but the branch.io is a possible solution for your working. He get dynamic link in facebook, google ads etc. You get this:

{
      "identity_id": "427469360685348303",
      "link": "https://example.app.link?%24identity_id=427469360685348303",
      "session_id": "429691081177874743",
      "data": {
        "$canonical_identifier": "item/1503684554354.28",
        "$canonical_url": "https://example.com/home?utm_campaign=test&deeplink=value",
        "$desktop_url": "http://example.com/home",
        "$identity_id": "427469360685348303",
        "$og_description": "My Content Description",
        "$og_image_url": "http://lorempixel.com/200/200/",
        "$og_title": "46D6D28E-0390-40E4-A856-BD74F34D24C8",
        "$publicly_indexable": 1,
        "+click_timestamp": 1503684563,
        "+clicked_branch_link": true,
        "+is_first_session": false,
        "+match_guaranteed": true,
        "custom": "blue",
        "random": "FE848A5B-78F7-42EC-A253-9F795FE91692",
        "added": "1503684554354.33",
        "~campaign": "new launch",
        "~channel": "facebook",
        "~creation_source": 3,
        "~feature": "sharing",
        "~id": 429691043152332059,
        "~referring_link": "https://example.app.link/X7OsnWv9TF",
        "~stage": "new person",
        "~tags": [
          "one",
          "two"
        ]
      }
    }