Android Question assets htm on a webview in debug mode

a n g l o

Active Member
Licensed User
Longtime User
the following code works ok on release mode.
in debug mode the webview display is : net : err_access_denied

i can live with it, but what's nedded to make iot run on debug mode as well ?
thank you

B4X:
Sub Globals
    'These global variables will be redeclared each time the activity is created.
        Private wv As WebView
End Sub

Sub Activity_Create(FirstTime As Boolean)
        Activity.LoadLayout("Layout")
        If wv.IsInitialized=False Then wv.Initialize("wv")
        Activity.AddView(wv,0,0,100%x,100%y)
        wv.Visible=False
End Sub

Private Sub Activity_Click
        If wv.Visible=False Then displayAssetsHtmInWebView("fh.htm")
End Sub

Private Sub displayAssetsHtmInWebView(fileName As String)
        wv.LoadUrl(webViewAssetFile(fileName))       
        wv.Visible=True
        wv.BringToFront
End Sub

Private Sub webViewAssetFile (fileName As String) As String  ''code from EREL
               Dim jo As JavaObject
            Dim retVal As String
               jo.InitializeStatic("anywheresoftware.b4a.objects.streams.File")
               If jo.GetField("virtualAssetsFolder") = Null Then
                         retVal= "file:///android_asset/" & fileName.ToLowerCase
               Else
                         retVal= "file://" & File.Combine(jo.GetField("virtualAssetsFolder"), _
                                                               jo.RunMethod("getUnpackedVirtualAssetFile", Array As Object(fileName)))
               End If
            Return retVal
End Sub


Private Sub wv_Click
        wv.Visible=False   
End Sub
 
Top