Android Question How to allow mixed content on webview

Discussion in 'Android Questions' started by kenkie21, Jul 1, 2019.

  1. kenkie21

    kenkie21 New Member Licensed User

    Hi
    Need help @Erel to solve mixed content when using webview library, i'm already use webviewextra and webviewsetting but didnt found solution to enable mixed content. Please some help.

    This the log :
    Mixed Content: The page at 'https://.../822123&autoplay=true' was loaded over HTTPS, but requested an insecure video 'http://...?refId=1'. This request has been blocked; the content must be served over HTTPS. in https://.../822123&autoplay=true (Line: 0)

    Thanks
     
    Last edited: Jul 3, 2019
  2. kenkie21

    kenkie21 New Member Licensed User

    Hi @Erel , please some advise please.
    Cause at native have this
    webView.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_COMPATIBILITY_MODE);
    for webview component, how i able to set it ?

    Thanks
     
  3. Erel

    Erel Administrator Staff Member Licensed User

    It is a mistake to limit your questions to a single member.

    Code:
    Sub Activity_Create(FirstTime As Boolean)
       
    Activity.LoadLayout("Layout1")
       
    Dim jo As JavaObject
       jo.InitializeContext
       
    Dim p As Phone
       
    If p.SdkVersion >= 21 Then
           jo.RunMethod(
    "setWebViewContentMode"Array(WebView1))
       
    End If
    End Sub


    #if JAVA
    import android.webkit.*;
    public static void setWebViewContentMode(WebView wv) {
       wv.getSettings().setMixedContentMode(2);
    }
    #End If
     
    inakigarm and Peter Simpson like this.
  4. kenkie21

    kenkie21 New Member Licensed User

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice