Hi,
I'm newly here in B4a and I'm trying to create a webapp using webview, i downloaded the WebViewExtras v1.42 and WebViewSettings v1.31 and I'm having error in this code saying addWebChromeClient is missing parameter...Please help thanks
Sub Globals
Dim WebView1 As WebView
Dim WebViewExtras1 As WebViewExtras
Dim WebViewSetting1 As WebViewSettings
End Sub
Sub Activity_Create(FirstTime As Boolean)
WebView1.Initialize("WebView1")
WebView1.JavaScriptEnabled=True
WebViewExtras1.addJavascriptInterface(WebView1, "B4A") ' NOT ESSENTIAL
WebViewExtras1.addWebChromeClient(WebView1)
WebViewSetting1.setDatabaseEnabled(WebView1, True)
WebViewSetting1.setDOMStorageEnabled(WebView1, True)
Log("DefaultWebViewDatabasePath: "&WebViewSetting1.getDatabasePath(WebView1))
' the WebView will fail to create any databases if the database path is NOT set
WebViewSetting1.setDatabasePath(WebView1, "")
Log("NewWebViewDatabasePath: "&WebViewSetting1.getDatabasePath(WebView1))
Activity.AddView(WebView1, 0, 0, 100%x, 100%y)
WebView1.LoadUrl("http://www.google.com")
End Sub
I'm newly here in B4a and I'm trying to create a webapp using webview, i downloaded the WebViewExtras v1.42 and WebViewSettings v1.31 and I'm having error in this code saying addWebChromeClient is missing parameter...Please help thanks
Sub Globals
Dim WebView1 As WebView
Dim WebViewExtras1 As WebViewExtras
Dim WebViewSetting1 As WebViewSettings
End Sub
Sub Activity_Create(FirstTime As Boolean)
WebView1.Initialize("WebView1")
WebView1.JavaScriptEnabled=True
WebViewExtras1.addJavascriptInterface(WebView1, "B4A") ' NOT ESSENTIAL
WebViewExtras1.addWebChromeClient(WebView1)
WebViewSetting1.setDatabaseEnabled(WebView1, True)
WebViewSetting1.setDOMStorageEnabled(WebView1, True)
Log("DefaultWebViewDatabasePath: "&WebViewSetting1.getDatabasePath(WebView1))
' the WebView will fail to create any databases if the database path is NOT set
WebViewSetting1.setDatabasePath(WebView1, "")
Log("NewWebViewDatabasePath: "&WebViewSetting1.getDatabasePath(WebView1))
Activity.AddView(WebView1, 0, 0, 100%x, 100%y)
WebView1.LoadUrl("http://www.google.com")
End Sub