App Links inside Custom Tabs in the same app - android

I am facing a problem where I'm loading some web pages in Custom Tabs, and I want to use App Links when going to a certain page to open the native app. From my investigation, it looks like if the page is open with Custom Tabs in the same application (same package name) as the settings for the App Links, it does not work.
To give you the real life example, I am using Custom Tabs for a "Sign up" flow, letting the user to enter his credentials in a web page, but when going to the next page where it should tell the user to check his email for the confirmation, I want to take the user to the native app, to a custom activity with the Android App Links.
Any suggestions of how to overcome this problem?

Found the problem in my case. If you run into the same problem, check that all your intent filers are verified on the domain.

Related

Deep links doesnt work when coming from the same website

I've already been able to setup deep links (universal links), whenever a link to my site (https://app.example.com) is clicked, it automatically opens the app. If its from slack, messenger or another website. The problem is, if I'm inside app.example.com and I create a link to open app.example.com, it doesn't open the app.
I cant seem to find any documentation to address this problem and I'm not sure if its even allowed, but basically this is the flow that I want to achieve:
(inside app) Click Connect Wearable button
(in browser) Default browser opens wearable's login page
(in browser) Wearable redirects to my own site (https://app.example.com/confirmed)
(in browser) Inside this page is a button that says Return to App [href="https://app.example.com/"]
(inside app) App opens
But as mentioned, step 5 doesn't open the app even if I placed a link-button (as expected on how universal links work), it just redirects within the browser.
Any solution? I need to be able to handle android and iOS, as well as not interfere with PC browsers. If needed, I code using Ionic v6.
Thank you!
As far as I know, this is expected behavior.
The reason is,
Let's say your user actually chose to navigate to your website instead of the application. Since the user is already browsing the website, we can assume the user will keep browsing the website, otherwise, he or she would be inside the app already.
This user might navigate to different pages on your website. If deep links try to send users to the app every time, it would be a terrible UX.
If your intent is to always open the app anyways, using a custom URI scheme is the way to go.
You can try defining custom URI scheme for your apps like "myApp://" and use that inside the button in browser.

open chrome custom tab in-app rather than in a window

I'm running into some issues with ChromeCustomTabs, although it might just be a misunderstanding on my end. I have an app where I have the option to open three links, an instagram page, facebook page, and a twitter page. Now, I chose to use custom tabs since it shares credentials with the system and so I won't have to ask the user to login when hitting these pages.
The problem is that facebook and twitter open in a new window, when I really need to get it to open in app where my menus are still available. Is this possible, or is a webview the only way to get a webpage to open in-app?
If this is the case, is there a way to get the links to open without prompting a user if they'd rather launch in chrome or in the native app?
I would like to avoid having to implement a webview with OAuth calls for easy logins if possible.
I tried the simple-chrome-custom-tabs for my project. It could be download from https://github.com/novoda/simple-chrome-custom-tabs. There are many parameters which could be used to customize the UI. Hope it works for you.

Facebook Deep linking for android app

I have a application and i have facebook page for the same.now whenever a user clicks on Use app(call to action) button on android device whether it is facebook android app or user is logged in from browser I need to open my app installed in user's phone.
I have searched so much but came across some old posts as facebook has introduces applinks.org meanwhile.
So I am not getting how to do this thing.
When you're setting up the Call To Action button on your page, you need to select App:
Then you will fill in a URL using your app's custom URL scheme in the Deep Link box (that's what actually launches your app on the visitor's device), and the package name of your app in the Package Name box (I believe Google uses this for verification purposes).
If you haven't set up a custom URL scheme yet, this Facebook docs page explains how. That will take care of opening the app (myApp://), but if you're wanting to go to a specific piece of content (myApp://path/to/content), then you also need to follow these directions.

Opening and closing an external page in a cordova application

We have a cordova app which needs to run on both iOS and Android. In this app, we need to open a webpage so that the user can login securely and then come back to the app with a generated token. We've looked at the inappbrowser plugin which allows us to open the system browser like this : window.open("http://loginWebsite", "_system"); and then we come back to the app with a custom URI scheme.
My problem with this is the page appears to stay open in the browser after the app is reoppened. On iOS it only leaves the last one open but on android it opens a new tab every single time, leaving them all open.
An alternate solution is to use the inappbrowser like so: window.open("http://loginWebsite", "_blank"); but this appears to give our developper team the possibility to inject code with executeScript in the login or credit card pages we would use. This kind of defeats the purpose of having our login be separate our app.
Are there any solutions or other options ? If possible we would rather have the login be completely separate but having an app leave a bunch of tabs open seems weird.
Thanks

How do I remove the browser from the activity stack if it launches my Activity?

We have been working on ways to launch our application from links in Email messages, and we have something that works pretty well. Only URLs with http/https schemes work properly, so we have written a small 'redirector' in our server application that sees we are coming from an Android browser and redirects to a URI with a scheme that our application launches. All of this is working pretty well.
The only bad part is because the browser is launched between clicking the link in the email, and the Application popping up due to the redirect, when the user hits the back button to go back to their email program after using our application, the browser is shown to the user. The browser is left on a blank page, and the user could become confused by this and not know to press the back button again to get back to their email.
When our application is launched from the link the browser will handle the URL and the redirect will cause our application to appear as usual. However, is there a way inside my application to tell Android that my application effectively replaces the browser on the back stack, so that if the back button is pressed, the user goes back to the Email program as if the browser didn't pop up in the first place?
Thanks in advance.
You can skip the entire browser in the middle by using an intent filter. You can register a specific schema to listen for and a given url to launch the application. This will launch your application directly and not put a browser in the middle. The YouTube application uses a method similar I'm sure to open the video directly in the YouTube application. This is a question that might point you in a good direction for implementing this.

Categories

Resources