androidfirebasefirebase-dynamic-links

How to get short URL link in android using Firebase Dynamic Links?


I'm trying to share a link which would redirect a user to YouTube link if clicked on a desktop browser and redirect to the app if clicked on Android.The links are working fine but I'm getting the deep link instead of short link

Uri uri = getIntent().getData();
String path = uri.getPath();

Is there a way to get the short link in android ?


Solution

  • I have just found a workaround this problem passing params in my deep link. For e.g.

    https://www.youtube.com/watch?v=y0brSA1cyzw&deeplinkparam=somevalue
    

    So, the deep link in above url is

    https://www.youtube.com/watch?v=y0brSA1cyzw
    

    and the param that I want to pass is appended by &deeplinkparam=somevalue