11

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: https://v73j2.app.goo.gl/?link=https://www.holinapp.com/dl/?chatId%3D-KXqOOZ-817GnBm8q1Ep%26userId%3DYqx6IeYkQGgxO8fIezTahCi5CEj2&apn=com.letsplanideas.holin&d=1

Community
  • 1
  • 1
MrBrightside
  • 2,669
  • 3
  • 17
  • 24
  • are you talking about chrome custom tabs ? – Abhinav Puri Dec 10 '16 at 10:40
  • @AbhinavPuri yes. By default, external links are opened in a custom tab. – MrBrightside Dec 10 '16 at 10:42
  • This link isn't working : `https://v73j2.app.goo.gl/gol2WmqeFwgrUapH3` – Abhinav Puri Dec 10 '16 at 10:50
  • @AbhinavPuri you have to open it in your cell phone in order to work because the default url isn't yet available. – MrBrightside Dec 10 '16 at 10:53
  • looks like bug on Chrome side, I would add +100 for solution – Dmytro Rostopira Dec 12 '16 at 09:01
  • Can you let us know which Chrome version and custom-tabs support library version are you using? I ran a test with the latest support library and started the tab with `new CustomTabsIntent.Builder().build().launchUrl(this, Uri.parse("https://v73j2.app.goo.gl/gol2WmqeFwgrUapH3"));` on Chrome 54 and it worked. – andreban Dec 12 '16 at 12:48
  • @andreban I'm not using any library for custom tabs. The problem is when you share the link with telegram, if you click the link in telegram chat, it opens a custom tab and instead of running the deep link (open Play Store or the app if it is installed) it just opens the Play store inside the custom tab. – MrBrightside Dec 12 '16 at 12:54
  • Maybe is a problem of custom tabs implementation in Telegram, because I've just tried with Hangouts and is working fine. – MrBrightside Dec 12 '16 at 12:59

1 Answers1

0

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).

Oleksiy Ivanov
  • 2,454
  • 15
  • 21