Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Closing chrome custom tab

In my use case, I have a page that deep links back to my app. When I open this page in Chrome custom tab, I am able to get back to my app by clicking the deep link but the issue is when I click on the device back button, the chrome tab is still visible.

Is there any way I can close the chrome custom tab when the user is back to my app/activity.

like image 748
Arun Avatar asked Oct 19 '15 19:10

Arun


People also ask

How to close Custom Chrome Tabs?

Currently it seems like clicking on the close button(the button on the top left) from the chrome custom tab page is the only way to close it. Yeah. Also if you set your app to be singleInstance or singleTop, then when you go back to it using an intent, the framework will finish Custom tab activity as well.

What is Chrome Custom Tabs?

Custom Tabs is a browser feature, introduced by Chrome, that is now supported by most major browsers on Android. It gives apps more control over their web experience, and makes transitions between native and web content more seamless without having to resort to a WebView.

What is custom tab in Salesforce?

Custom tabs let you display custom object data or other web content in Salesforce. When you add a custom tab to an app in Salesforce Classic, it appears as a tab. When you add a custom tab to an app in Lightning Experience, it appears as an item in the app's navigation bar and in the App Launcher.


1 Answers

Setting the below flag while opening chrome custom tab seems to resolve the issue for me http://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_NO_HISTORY

like image 73
Arun Avatar answered Sep 28 '22 06:09

Arun