I have created an app that akes lot's of API Calls. Some times the connection to the server isn't easy, so the app has to wait. This is why I have added a Loading Indicator for the user to know that everything works fine, they just have to wait a few seconds.
I have a project building an automatic backup downloading tool in B4J but have hit a major snag...
The App contains a B4XTable with information about a download enabling a login to a given server and a path from which it pulls the latest (backup) file and saves it.
To pull the given file, I...
Hello, I would like to know if it is possible to wait for a B4XPages (QrCode Reader) page to finish and then obtain the result.
The first thing I do is load the page that reads in qrcode
Private Sub ButtonQrOrigen_Click
B4XPages.ShowPage("Qr Code Reader")
Dim Resultado As String =...
I have a LogIn page with a LogIn button.
When the button is pressed, an http job gets initialized and after that I use a wait for statement until the job is completed, like so:
Hi guys! How are you,
I state that I'm new to B4J and, despite my many attempts and various readings, I can't do something that should be simple.
In practice I have created a web portal in B4J and I manage the various pages through the handlers. So far, so good.
The problem arises when I...
For Each TotalPlayer As String In TS.Players
Dim Sum As Int = SumAll(TotalPlayer, TS.Multiplier)
Wait For (SumAll(TotalPlayer, TS.Multiplier)) Complete (Sum As Int) 'This should throw a waring but doesn't and thus breaks program flow.
Dim SB As StringBuilder...
I am calling a sub called ShowDialog from multiple places in code. Message1 is string Variable.
My code should display Dialog and wait for either ok or cancel.
Dialog is shown but code moves on to Additional Code
Would be really nice if anyone can share or...
Hi, all. I was trying the following codes to learn Wait For and Sleep. However, I always failed to get the output right.
The code is like this:
private sub p1
Wait For p2
log("p1 ended") 'It seems that this line of...
To all the friendly Anywhere Experts:
If make the following call using WebViewExtras:
In the sub "getElmTopHeightText" I am setting some Global variables.
How do I use...
I am writing an app which uses MQTT, and I find a problem with "wait for".
In an activity "info" I must collect several data from MQTT: every datum is asked for by publishing a topic and waiting for the reply. I would like to write several lines like:
I'm moving part of my code done in a B4XPage into a Standard Class.
In this code i've a Runtime Permission CheckAndRequest that requires the "Wait For" block
Private Sub BeginBLEscan
I am trying to get some data from a server with a DBRequest using the DBRequestManager library and wait for the answer to do something else in the same sub when the answer returns:
cmd.Name = "update_usr"
cmd.Parameters = Array As Object(tempUsr)...
Hi, I am using this tutorial on how to connect to MySQL DB
But I have a problem because I need to wait for the query to finish before proceeding on to the next process.
I send a SELECT * FROM and I need to...
Small clarification needed regarding Resumable Sub/Wait for Event consumption
I have a sub called TTSCompleted which is called by a lib
in main code I use the following statement
Wait for TTSCompleted
When the event happens "Wait for" apparently resumes but the Sub TTSCompleted is not...
Well, I have (had) a simple sub that returns a value.
This sub will now use the shell, so it has become a resumablesub.
It so happens that I call these sub from various points in my project, and now each sub that calls this resumablesub will also become a resumablesub, forcing me to also...
I saw a recommendation not to use DoEvents:
But the window freezes if you don't use something to wait a while. And Windows O.S. notifies you that the window is not responding.
I managed to read...
I have the following situation. I'm sending some data over usb serial and I have to wait for an answer from the other party (a hardware device) before sending data again.
I want to use Wait For with AsyncStream, but there are situations when the other party does not answer at...
I appear to have a problem when I insert a resummable sub, within a try/catch block i.e.
' This will work Ok if the is error in DoSomething() - '
a = DoSomething(...)
Log(LastException) ' Catch works and traps the error
' However if DoSomething() returns...
I had a bad time searching for a bug where the program logic hung. It turned out I wrote
Wait For Msgbox_Respond (...)
Wait For Msgbox_Result (...)
Same problem when I used
Wait For JobComplete ...
Wait For JobDone ...
The problem is that neither the IDE nor the...
Hi, I have a question.
I created a small project (see the attachment) where I tried to learn how to work with a subject.
I created a class where I put all the logic -the main procedure in this class calls a private sub that sends request to the server