In this thread:
https://www.b4x.com/android/forum/threads/server-jokhttputils2-server-version.124350/#content
Erel explains how to make jOkHttpUtils2 work in a non-UI server app.
Unfortunately it is a bit opaque for me.
On the line:
3. The library code calls Main.srvr.CreateThreadSafeMap. If you named your server object differently then you need to add such public global variable and assign it the server object.
In my ABMaterial app the server is:
Public Server As ABMServer
so to comply with 3. I added to the Main module of my app:
Public srvr As Server = Server.srvr
and I can see Server.srvr has a method CreateThreadSafeMap
However when I run the code in Debug mode I get a java.lang.NullPointerException at the line
TaskIdToJob = Main.srvr.CreateThreadSafeMap
in HttpUtils2Service
And I am stumped - any suggestions appreciated.
https://www.b4x.com/android/forum/threads/server-jokhttputils2-server-version.124350/#content
Erel explains how to make jOkHttpUtils2 work in a non-UI server app.
Unfortunately it is a bit opaque for me.
On the line:
3. The library code calls Main.srvr.CreateThreadSafeMap. If you named your server object differently then you need to add such public global variable and assign it the server object.
In my ABMaterial app the server is:
Public Server As ABMServer
so to comply with 3. I added to the Main module of my app:
Public srvr As Server = Server.srvr
and I can see Server.srvr has a method CreateThreadSafeMap
However when I run the code in Debug mode I get a java.lang.NullPointerException at the line
TaskIdToJob = Main.srvr.CreateThreadSafeMap
in HttpUtils2Service
And I am stumped - any suggestions appreciated.