Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

458
Visualizações
Webview gives error while leaving from my app js error

Hey stackoverflow I am redirecting user to Webview from my app the redirection url is host on my server which is working fine on my device but in my testing its not working for some other devices. Error which i found from logcat is :

I/chromium: [INFO:CONSOLE(478)] "Uncaught TypeError: Cannot set property 'innerHTML' of null", source: https://secure-acs2ui-b1-indmum-mumrdc.wibmo.com/v1/acs/legacy/live/8547/M.P/uid=fd076e4c-afc4-44b2-99f5-97a0bC3lD7qB (478)

My webview function is :

    private fun configureWebview() {
        // Get the web view settings instance
        val settings = binding.webView.settings

        // Enable java script in web view
        settings.javaScriptEnabled = true

        // Enable and setup web view cache
        settings.setAppCacheEnabled(false)

        // Enable zooming in web view
//        settings.setSupportZoom(true)
//        settings.builtInZoomControls = true
//        settings.displayZoomControls = true


        // Zoom web view text
        settings.textZoom = 125


        // Enable disable images in web view
        settings.blockNetworkImage = false
        // Whether the WebView should load image resources
        settings.loadsImagesAutomatically = true


        // More web view settings
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
            settings.safeBrowsingEnabled = true  // api 26
        }
        //settings.pluginState = WebSettings.PluginState.ON
        settings.useWideViewPort = true
        settings.loadWithOverviewMode = true
        settings.javaScriptCanOpenWindowsAutomatically = true
        settings.mediaPlaybackRequiresUserGesture = false


        // More optional settings, you can enable it by yourself
        settings.setAppCacheEnabled(false)
        settings.domStorageEnabled = true
        settings.defaultTextEncodingName = "utf-8"
        settings.setSupportMultipleWindows(true)
        settings.loadWithOverviewMode = true
        settings.allowContentAccess = false
        settings.allowUniversalAccessFromFileURLs = false
        settings.allowFileAccess = false
        
        // WebView settings
        binding.webView.fitsSystemWindows = true


        /*
            if SDK version is greater of 19 then activate hardware acceleration
            otherwise activate software acceleration
        */
        binding.webView.setLayerType(View.LAYER_TYPE_HARDWARE, null)
    }

Please help me to resolve this error thanks in advance

about 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda