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.
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.
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.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With