3

I'm trying to display amp-story in webview, and it's working fine on ios/swift, but when i'm using android/kotlin, "amp-story-timeline" element is not render and just leaving empty space

Kotlin/Black lines on top is where timeline should be

Swift/Timeline is showing ok

My kotlin webview config:

WebView(it).apply {
            layoutParams = ViewGroup.LayoutParams(
                ViewGroup.LayoutParams.MATCH_PARENT,
                ViewGroup.LayoutParams.MATCH_PARENT
            )
            webViewClient = WebViewClient()
            webChromeClient = WebChromeClient()
            settings.cacheMode = WebSettings.LOAD_DEFAULT
            setCookiesEnabled(true)
            CookieManager.getInstance().acceptThirdPartyCookies(this)
            settings.domStorageEnabled = true
            settings.databaseEnabled = true
            settings.useWideViewPort = true
            settings.loadWithOverviewMode = true
            settings.mediaPlaybackRequiresUserGesture = false
            settings.javaScriptEnabled = true
            val extraHeaders: MutableMap<String, String> = HashMap()
            extraHeaders["Referer"] =
                Intent.URI_ANDROID_APP_SCHEME.toString() + "//" + context.packageName
            loadUrl(urlToRender, extraHeaders)
        }

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
E.Egorov
  • 53
  • 4

0 Answers0