Well
My intention was to have an Android Play Store for my ABM app. I needed my app to remember the login details, meaning that it needs to access localstorage.
Thing is, local storage is not accessible with the normal webview. That's where WebViewExtras come in.
I'm using WebViewExtras2.
Let's go.
In Globals, I reference my classes.
In Activity_Create, I start up a few things...
My webview sits on a layout, so I load the layout first and then...
On interesting thing I checked out was the wcc_console when I was running my app.
Off course you can remove the console code... but it helps also to see your app execution from the B4A side.
So I compiled by 1 page app and off to the play store. Installed in on my phone and nicely, I have a nice ABM app running on my Android as if its native, without the necessity of opening a browser.
My intention was to have an Android Play Store for my ABM app. I needed my app to remember the login details, meaning that it needs to access localstorage.
Thing is, local storage is not accessible with the normal webview. That's where WebViewExtras come in.
I'm using WebViewExtras2.
Let's go.
In Globals, I reference my classes.
B4X:
Private wbe As WebViewExtras
Private wcc As DefaultWebChromeClient
In Activity_Create, I start up a few things...
My webview sits on a layout, so I load the layout first and then...
B4X:
wbe.Initialize(WebView1)
wcc.Initialize("wcc")
wbe.SetWebChromeClient(wcc)
wbe.GetSettings.SetDOMStorageEnabled(True)
WebView1.JavaScriptEnabled = True
WebView1.ZoomEnabled = False
WebView1.LoadUrl("YOUR_URL_FOR_YOUR_ABM_WEBAPP")
On interesting thing I checked out was the wcc_console when I was running my app.
B4X:
Sub wcc_ConsoleMessage(ConsoleMessage1 As ConsoleMessage) As Boolean
Log("wcc_ConsoleMessage")
Log(ConsoleMessage1.Message)
End Sub
Off course you can remove the console code... but it helps also to see your app execution from the B4A side.
So I compiled by 1 page app and off to the play store. Installed in on my phone and nicely, I have a nice ABM app running on my Android as if its native, without the necessity of opening a browser.