-
Use caseAs user, I want to share my When my friend try to open the same link from desktop, he will see firebase blank page with description about invalid deeplink.
ExpectAs developer, I expected that when user open this link from desktop (or other platform), he will see some fallback url (my website, market link or something else), describes that this link available only from supported platforms. ResearchIn Firebase Dynamic Links docs we can see, that this behavior is supported by passing specific link to For approve this, we can create sample of long dynamic link that correctly opens from mobile app and fallback to But this link is terrible for user experience, we need short link. SuggestionSince native libs do not allow to create short links with
For now, it can be achieved with some hacky way:
QuestionCan we achieve the same result in more convenient way and remove hacky step? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
My app works just fine with fallback links, here's my profile, should render correctly Here's the debug mode https://app.komp.ai/me/29hQ?d=1 I generate that deep link in my app dynamically console.log('DynamicLinkStore::getProfileLink - building link');
firebase
.dynamicLinks()
.buildShortLink(
{
link: `${AppConfig.getWebAppURIRoot()}/${user.profileName}`,
domainUriPrefix: AppConfig.getDeepLinkRoot(),
android: {
packageName: AppConfig.getAndroidPackage(),
},
ios: {
bundleId: AppConfig.getIOSBundle(),
appStoreId: AppConfig.getIOSAppId(),
},
social: {
title: `${user.profileName} ${I18NService.translate(
'ProfileShareSocialYour'
)} Komp.ai`,
descriptionText: I18NService.translate('ProfileShareSocialDescription'),
imageUrl: `${AppConfig.getWebAppURIRoot()}/ms-icon-310x310.png`,
},
},
firebase.dynamicLinks.ShortLinkType.SHORT
)
.then((link) => {
// HERE IS THE LINK HERE...
console.log(`DynamicLinkStore::getProfileLink - got link: ${link}`);
})
.catch((err) => {
console.log('DynamicLinkStore::getProfileLink - unable to build link?', err);
DynamicLinkStore.profileLinkLoading = false;
}); ...so I think everything is working |
Beta Was this translation helpful? Give feedback.
-
https://abodeofmystories.blogspot.com/2021/03/react-native-dynamic-links-from-desktop.html |
Beta Was this translation helpful? Give feedback.
My app works just fine with fallback links, here's my profile, should render correctly
https://app.komp.ai/me/29hQ
Here's the debug mode
https://app.komp.ai/me/29hQ?d=1
I generate that deep link in my app dynamically