I'm trying to use a webview in a B4J application but it only appears to be saving the cookies into memory which is a default setting going by the Java documentation rather than a file so my web application doesn't stay logged in as the cookie is lost when it closes.
I've put the following code in that let's me see that the cookies are being received plus I can run a debugger on the server and see if the cookies are being sent back from the webview.
My JavaScript also saves data into local storage, I presume that bit is working but it's tricky to tell at the moment.
I think it needs something to tell it to store the cookie in a file and possibly where that file should be. Any help appreciated before I give up and just start chrome in kiosk mode which isn't ideal!
I've put the following code in that let's me see that the cookies are being received plus I can run a debugger on the server and see if the cookies are being sent back from the webview.
My JavaScript also saves data into local storage, I presume that bit is working but it's tricky to tell at the moment.
I think it needs something to tell it to store the cookie in a file and possibly where that file should be. Any help appreciated before I give up and just start chrome in kiosk mode which isn't ideal!
B4X:
Dim manager As JavaObject
manager.InitializeNewInstance("java.net.CookieManager", null)
Dim handler As JavaObject
handler.InitializeStatic("java.net.CookieHandler").RunMethod("setDefault", Array(manager))