I’ve created some Firebase Dynamic Links in my application programmatically that are working fine when they are long ULRs, I mean, the default Dynamic Link that Firebase creates. If the user does not have the app installed, it opens the Play store and after installing the app it opens the deep link. In the other hand,if the user has the app installed, it opens directly the deep link.
Well, after that, I’ve tried to create a short version of the Dynamic link because the URLs were to long and don’t look “pretty” for the eye and to hide some info that was appearing in the link too.
First, I did it using the Google URL shortener API because for that time Firebase did not have any service to do it programmatically. Here you can find my answer on how to create a short version using Google Shortener API. And after Firebase released their service I used too.
Ok, so the problem is that the shorten link was created fine, until I discovered that if it is opened by a Custom Tab, like it does in Telegram, the deep link won’t work. It always opens the app’s Play store page directly into the custom tab, regardless of the user has the app installed or not and won’t launch the deep link if the user has the app installed. Of course, if is not a custom tab it works fine.
You can check the dynamic link created (check it on an Android device, otherwise the link won’t open the play store or app due to the default URL is not avaialable yet): https://v73j2.app.goo.gl/gol2WmqeFwgrUapH3
and here is the map of the Dynamic Link that returns the Firebase service:
Probably late to the party but… Firebase Dynamic Links added Android Builder API https://firebase.google.com/docs/dynamic-links/android/create . Also similar API has been added for iOS.
Google URL shortener you trying to use, is maintained Firebase Dynamic Links team as well. We do not recommend wrapping Firebase Dynamic Links inside any kind of shorteners (outside of Firebase Dynamic Links shorten API).