Merge pull request #36 from msfjarvis/custom-tabs-update

This commit is contained in:
Harsh Shandilya 2020-10-03 02:19:48 +05:30 committed by GitHub
commit 78484de959
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,8 +3,6 @@ package dev.msfjarvis.lobsters.urllauncher
import android.content.Context
import android.net.Uri
import androidx.browser.customtabs.CustomTabsIntent
import saschpe.android.customtabs.CustomTabsHelper
import saschpe.android.customtabs.WebViewFallback
class UrlLauncherImpl(private val context: Context) : UrlLauncher {
override fun launch(url: String) {
@ -12,11 +10,6 @@ class UrlLauncherImpl(private val context: Context) : UrlLauncher {
.setShareState(CustomTabsIntent.SHARE_STATE_ON)
.setShowTitle(true)
.build()
CustomTabsHelper.addKeepAliveExtra(context, customTabsIntent.intent)
CustomTabsHelper.openCustomTab(
context, customTabsIntent,
Uri.parse(url),
WebViewFallback()
)
customTabsIntent.launchUrl(context, Uri.parse(url))
}
}