I'm trying to get functionality of webview and command line. But as I understand that is imposible. My idea was lunch externally by command line or bat file b4j_app.jar / b4j_app.exe pass some parameter like url. Use a webview to grab some data from html/js tags. do the job and close app.
you can use httputils and download the html/js and process it asyncronously:
B4X:
Sub AppStart (Args() As String)
Dim job1 As HttpJob
job1.Initialize("Job1", Me)
job1.Download("https://www.b4x.com/")
StartMessageLoop
End Sub
Sub JobDone (Job As HttpJob)
Log("JobName = " & Job.JobName & ", Success = " & Job.Success)
If Job.Success = True Then
Select Job.JobName
Case "Job1"
' 'do something with the string
Log(Job.GetString)
End Select
Else
Log("Error: " & Job.ErrorMessage)
End If
Job.Release
End Sub