Android Question [SOLVED] WebViewExtras lib

Discussion in 'Android Questions' started by Lello1964, May 29, 2019.

  1. Lello1964

    Lello1964 Active Member Licensed User

    i'm tryning to open xml file with xls scheme using WebViewExtras lib,
    this my code :
    Sub Globals
    Dim WebView1 As WebView
    Dim WebViewExtras1 As WebViewExtras
    Dim WebViewSetting As WebViewSettings
    Dim DBFileDir As String                   : DBFileDir =RP1.GetSafeDirDefaultExternal("")
    End Sub

    Sub Activity_Create(FirstTime As Boolean)
    Activity.AddView(WebView1, 00100%x100%y)
    Dim url="file:///" & File.Combine(DBFileDir, "IT00430310672_0001N.xml")
    Log("Loading " & url)
    End Sub

    file xls and xlm are ... /Android/data/xmkl.test/files/

    i have this error :

    Logger connesso a:  Xiaomi Redmi Note 
    --------- beginning of system
    --------- beginning of main
    Service (starter) Start **
    Activity (main) Create, isFirst = true **
    Unsafe attempt 
    to load URL file:///storage/emulated/0/Android/data/xmkl.test/files/fatturapa_v1.2.xsl from frame with URL file:///storage/emulated/0/Android/data/xmkl.test/files/IT00430310672_0001N.xml. 'file:' URLs are treated as unique security origins.
     in file:///storage/emulated/0/Android/data/xmkl.test/files/IT00430310672_0001N.xml (Line: 2)
    Activity (main) Resume **

    how can i solve ?
  2. Lello1964

    Lello1964 Active Member Licensed User

  3. Erel

    Erel Administrator Staff Member Licensed User

    Try to load it from File.DirInternal.
  4. Lello1964

    Lello1964 Active Member Licensed User

    Erel, thanks for answare, but i have tryed to open XML files using File Manager with default Smartphone browser and i have some blank image.
    If i use Mozilla to open XML i will see XML with XSL format correct.
    I think cannot solve this problem.
  5. Lello1964

    Lello1964 Active Member Licensed User

    Dim jo As JavaObject = WebView1
    Dim settings As JavaObject = jo.RunMethod("getSettings"Null)
    Dim r As Reflector
       r.Target = 
    Star-Dust likes this.
  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