Hello,
I am trying to load a web page (Home Assistant) on my tablet (Teclast T10 / Android 7.0). However, after login, the webpage does not display any content, only a white page.
Apparently the tablet has its own webview implementation (com.android.webview) instead of the one from Google (com.google.android.webview) - I installed this from the PlayStore.
In the developer settings I can only select "com.android.webview" as webview. If I call the page via the installed Chrome browser, everything works as desired.
I have also tried using WebViewExtras and WebChromeClient, but also without success:
I do get error messages displayed from the console, but they come up even with the login page still working:
It doesn't work with the WebkitLibrariesSet either.
Do I have any other option?
Could I call Chrome in a panel, or does Android not allow that?
Thanks a lot in advance.
I am trying to load a web page (Home Assistant) on my tablet (Teclast T10 / Android 7.0). However, after login, the webpage does not display any content, only a white page.
Apparently the tablet has its own webview implementation (com.android.webview) instead of the one from Google (com.google.android.webview) - I installed this from the PlayStore.
In the developer settings I can only select "com.android.webview" as webview. If I call the page via the installed Chrome browser, everything works as desired.
I have also tried using WebViewExtras and WebChromeClient, but also without success:
B4X:
Sub Globals
'These global variables will be redeclared each time the activity is created.
Private WebView1 As WebView
Private wwe As WebViewExtras
Private WebChromeClient1 As DefaultWebChromeClient
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout( Layout)
wwe.Initialize(WebView1)
WebChromeClient1.Initialize("WebChromeClient1")
wwe.SetWebChromeClient(WebChromeClient1)
wwe.JavaScriptEnabled = True
wwe.LoadUrl("http://homeassistant.local:8123")
End Sub
Private Sub WebChromeClient1_ConsoleMessage(ConsoleMessage1 As ConsoleMessage) As Boolean
Log(ConsoleMessage1.Message)
Return True
End Sub
I do get error messages displayed from the console, but they come up even with the login page still working:
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
Failed to set referrer policy: The value 'same-origin' is not one of 'always', 'default', 'never', 'no-referrer', 'no-referrer-when-downgrade', 'origin', 'origin-when-crossorigin', or 'unsafe-url'. This document's referrer policy has been left unchanged.
The key "viewport-fit" is not recognized and ignored.
Uncaught SyntaxError: Unexpected token import
Uncaught SyntaxError: Unexpected token import
Uncaught ReferenceError: globalThis is not defined
The key "viewport-fit" is not recognized and ignored.
Uncaught SyntaxError: Unexpected token import
** Here is the part after the login **
Failed to set referrer policy: The value 'same-origin' is not one of 'always', 'default', 'never', 'no-referrer', 'no-referrer-when-downgrade', 'origin', 'origin-when-crossorigin', or 'unsafe-url'. This document's referrer policy has been left unchanged.
The key "viewport-fit" is not recognized and ignored.
Uncaught SyntaxError: Unexpected token import
Uncaught SyntaxError: Unexpected token import
Uncaught ReferenceError: globalThis is not defined
It doesn't work with the WebkitLibrariesSet either.
Do I have any other option?
Could I call Chrome in a panel, or does Android not allow that?
Thanks a lot in advance.