Should I use Firebase Dynamic Links over Universal and App Links? - firebase

Im building an app for iOS and Android and need to open urls in the app on mobile and in the browser on desktop.
All links should open in the app if possible, so I cant generate one link for each possible url.
Can I do this in Firebase or do I have to create links in advance?

I'm not sure this question is related specifically to Firebase, or a general one.
I can try answering about the general case:
For opening in App:
In order to use Universal Links in iOS and AppLinks in Android, you'll need your click server to host Apple's AASA file or Android's asset file. This means that you'll need to serve that file for the operating system.
For opening in browser on desktop:
You'll need your click server to be able to detect desktop user agent and redirect you to store.
I didn't understand your question about: All links should open in the app if possible, so I cant generate one link for each possible url. Actually one link can fit all use cases, but you'll need to develop that capability in your own click server.

Related

React Native - Dynamic link not persisting through install process

I have a small React Native app for which I have a series of Firebase dynamic links. When the app is installed, the links work perfectly in directing users to the relevant screen defined in the dynamic link
However, if the user does not have the app installed when the dynamic link is followed, the route defined in the dynamic link does not persist.
Is it possible to persist the deep link during the installation process?
I've tried a basic deep link URL like https://fakedomain.org/upload as well as using the ?link=https://fakedomain.org/upload param and neither seem to work.
To answer your question, it is possible to persist the link after installs but it won't be %100 successful because of some limitations on the iOS side. You can check the flowcharts in here
There could be a couple of reasons for it not to work after the app installation. Since no code is provided I'll assume you are listening to the dynamic link with onLink for the app's active state and checking the initial link with getInitialLink when your app is in the quit state.
Persisting the link after app installation involves the clipboard in iOS so make sure the problem is not related to new iOS 16 copy/paste permissions.
Your navigation library might be trying to navigate to the route from the link before your navigation stack is initialized.
If the problem occurs only in one platform it might indicate a problem in your native setup like maybe related to LinkingManager etc.
If you are using a custom domain, you should double check your Associated Domains and AndroidManifest settings.

Locking Quiz - Preventing opening another window during quiz

Is it possible to get an app script code to stop users from opening another window/ tab while filing up a form/quiz? What are the other possible solutions?
I don't think this is possible via Apps Script code. However, there are different ways you can achieve this depending on devices users log in to. For instance, there is this option Use locked mode for quizzes for ChromeOS devices. Furthermore, if you have Google Workspace users, you can block by URLs using a Local policy or remotely from the Admin console. These last 2 options, block users from navigating to other web URLs by using the wildcard "*" except the URLs you specify in the "Exceptions".
If you have other browsers installed in users'devices, then you can create a temporal Context-Aware access rule as specified in these steps. With these rule and the correct Google Workspace edition, you can block access from any other browser except Chrome.

How to open Google Authenticator from a link?

I'm developing a website that requires a 2FA. We already permit to users to set it by scanning a QR Code shown in our configuration page.
My question is a bit more tricky. How can I permit user to open the app if he opens the page from mobile browser, ie. navigating from the phone with the Authenticator app installed?
I already have the logic to understand if the user is on mobile or not, but I don't find any solution that can replace the QRCode since the user cannot use the mobile camera in that case (he is using the phone to net on my website!).
I was searching the possibility to create a link that is recognised by an authenticator app (Google Authenticator or Microsoft Authenticator) but I didn't find a solution. Any idea?
After some research and trial, I found the link I was searching for.
In Google Authenticator (or any other app), the account are listed in the form:
Amazon(my#amazon.com)
123455
Google(me#gmail.com)
455234
Issuer(email)
554645
AnotherCode
142414
In order to generate a new entry without scanning the QRCode, a link in the form of:
otpauth://totp/dev#it.com?secret=123abc&issuer=StackOverflow
has to be opened. For instance, the link above results in the following entry:
StackOverflow(dev#it.com)
The link is opened by the phone using the installed Authenticator app.

Open telegram app from a link in a mobile web site

Is there any way to open telegram application from a website being in a mobile? I know if you use telegram:// you can open telegram app, but how can I open telegram and create a new conversation with a given number? i know it is possible by whatsapp like this:
this is the link https://api.whatsapp.com/send?phone=359883378007,
when the link loads it beign redirected to this link
whatsapp://send/?phone=359883378007
You can use this link to open conversation with telegram username:
https://telegram.me/telegramUsername
telegramUsername:
username without #
To share with Telegram.me, you have the following URL options...
https://t.me/share/url?url={url}&text={text}
https://telegram.me/share/url?url={url}&text={text}
tg://msg_url?url={url}&text={text}
Take a look at the official API source: Core.Telegram.org: Widgets -> Sharing Button. They suggest the t.me format. It seems like telegramUsername format, or any format indicating a user or a phone number, is not supported according to the documentation.
You may share:
url : The URL you want to share.
text : Text to accompany the URL you want to share.
If you are interested in watching a project that keeps track of these URLs, then check us out!: https://github.com/bradvin/social-share-urls#telegramme
2022 Updates
YOU CAN'T DO THAT.
But, you can do the same with username -
https://telegram.me/Telegram_Username_Here
For updating the information -
telegram:// no longer works on the latest chrome browser of pc version, instead of this, use tg:// which works great on all devices.

Dynamic links in Facebook mobile app is not deep linked to app

Problem — when opening a Firebase Dynamic Link on Facebook Mobile, the Facebook Browser consumes the deep link and does not open the intended mobile app
Question — is there a good workaround in Firebase to help Facebook deliver on the promise of presenting my Dynamic Link as intended?
We are aware of http://applinks.org, and that Facebook is a contributor. Does Firebase have a way to configure their server using the AppLinks spec so that Facebook will pass through the Deep Link to our app instead of consuming it?
Background — I have created a Firebase Dynamic Link for an iOS and Android app.
The Dynamic link delivers everything I expect and is a fantastic experience.
When opened on iOS, it navigates to the App. If not installed, it goes
App Store
When opened on Android, it navigates to the App. If not installed, goes to Play Store
When opened on non-mobile, it navigates to our Website
On Facebook mobile, neither 1 nor 2 happens. The result is that it goes straight to the mobile web experience, thereby eliminating the promise of the Firebase Dynamic Link
To avoid this cases we made a webpage which redirects to firebase dynamic link.
With this solution we can:
Use our domain, not the firebase url.
Ensure that firebase links works in every cases, for example when it opens from a custom browser (fb, samsung).
The disadvantage of doing this is that you'll always need to pass through a web page with an redirect.
I recently had to integrate dynamic links to one of my clients apps, and I got lots of trouble because of deeplinks not working on facebook+android_app.
As I couldn't move to branch.io because of princing reasons, I had to work it out on a different way so followed #Rahul Shukla advise.
I ended with a very simple nodejs+express setup where I receive the dynamic link ID and return a HTML with all the meta-tags required by facebook applinks (android + iOS) and a redirect script (window.location = 'your_dynamic_link') for other clients to be used.
The best part is that now on facebook the app opens directly without the preview page in both platforms and the link works on all browsers via the script redirect.
Here is the gist
the solution I found was to redirect to the dynamic link from a webpage like this
window.location.href = "intent:https://example.page.link/2wertygf456#Intent;end";
this will open the link in your system default external browser and the deeplinks works perfectly.
to trigger this only on facebook in-app browser
if (ua.indexOf("FBAN") != -1 || ua.indexOf("FBAV") != -1) {window.location.href = "intent:https://example.page.link/2wertygf456#Intent;end";}
We were struggling with the similar issue and here's how we finally solved it:
Say this is the final firebase url you are going to share
https://xxxx.app.goo.gl/?apn=com.your.package&link=http://www.yourwebsite.com
Now in the index.html page of your website, add the following meta tags
<meta property="fb:app_id" content="your_fb_app_id" />
<meta property="al:android:package" content="com.your.package" />
<meta property="al:android:app_name" content="YourAwesomeApp" />
<meta property="al:android:url" content="somescheme://XYZ" /> <!-- identifiable by your app, your app must handle this data scheme inside your manifest's intent-filter tag --!>
<meta property="al:web:should_fallback" content="true" />
<meta property="al:web:url" content="http://www.yourwebsite.com/" />
Now the app launches on clicking on the facebook post shared using this link.
I've tried some ways but totally fail. When I use the dynamic link in Facebook post, it shows a dialog to ask me if I wanna open application (I did not install my application yet). Although I accept to open app, nothing happens, it does not open Apple Store as expected
I have to use link like below to force it open apple store app
https://myapp.app.goo.gl/?link=http://mylink.com&ifl=https://itunes.apple.com/us/app/apple-store/idxxxxxxxx%3Fmt%3D8%26ct%3Dutm_source
Deep link with facebook app not work in android because facebook uses InAppBrowser, If you want to make your deep link url workable in facebook. You can change facebook settings like:
In Facebook App: Goto Profile -> App Setting -> check Links open externally.
After changing the setting you will be open deeplinks from facebook app android

Resources