1: In post #47 of this Tutorial https://www.b4x.com/android/forum/t...olution-device-desktop-and-web-reports.37254/ Erel says that the example is old and no longer recommended. Is there a newer example of a B4A, B4J Desktop, and B4J Server Data collection app?
2: In the app above is it possible to control the server from the desktop app (on the same machine) using jShell library to launch the server and a HTTP Handler to stop it? I tried by copying snippets from the examples but the sh_ProcessCompleted never fires.
Thanks,
Jim
2: In the app above is it possible to control the server from the desktop app (on the same machine) using jShell library to launch the server and a HTTP Handler to stop it? I tried by copying snippets from the examples but the sh_ProcessCompleted never fires.
B4X:
Sub btnStartServer_Click
If ServerStarted = False Then
sh.Initialize("sh", "java" , Array As String("-jar", "C:\Dropbox\B4x\CrossPlatform\Beeps\Server\Objects\BeepsServer.jar"))
sh.Run(-1)
ServerStarted = True
SetButtons(ServerStarted)
End If
End Sub
Sub sh_ProcessCompleted (Success As Boolean, ExitCode As Int, StdOut As String, StdErr As String)
Log($"sh_ProcessCompleted:${Success}, ${ExitCode}"$ )
If Success And ExitCode = 0 Then
Log(StdOut)
btnShowAll_Action 'show existing data
ServerStarted = True
SetButtons(ServerStarted)
Else
Log("sh_ProcessCompleted:Error: " & StdErr)
End If
End Sub
Thanks,
Jim