wait for

  1. yo3ggx

    Android Question Wait For with Astream

    Hello everybody. 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...
  2. D

    Android Question Problem with Try Catch and Wait for

    Hi, Guys 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() - ' Try a = DoSomething(...) Catch Log(LastException) ' Catch works and traps the error End Try ' However if DoSomething() returns...
  3. C

    Wish Autocomplete Event names with Wait For

    Hi, I had a bad time searching for a bug where the program logic hung. It turned out I wrote Wait For Msgbox_Respond (...) instead of Wait For Msgbox_Result (...) Same problem when I used Wait For JobComplete ... instead of Wait For JobDone ... The problem is that neither the IDE nor the...
  4. A

    Android Question Wait For with OkHTTPUtils2 and CallSubDelayed

    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 Sub Class_Globals Public FacilityID...
  5. stingrae

    Android Question Http Job Wait For Hangs

    Hi, I can't seem to figure this out. When I call the following code, it hangs on the Wait For: Dim strThisURL As String = "URL of my API" Dim j As HttpJob j.Initialize("" , Me) j.Download(strThisURL) Wait For (j) JobDone(j As HttpJob) ' Hangs Here Dim MyDataList As List Dim...
  6. behnam_tr

    B4J Question how use "wait for" to check file existing

    hi i creat a pdf file in my b4j app using printhtml and jshell and i save that in my app folder then i upload to myhost after runing jshell complet event i use sleep(4000) then file is ready for upload.... now i want to use "wait for" instead of sleep to checking file exist without using sleep...
  7. LucaMs

    B4A Class [B4X][B4XLib] WaitForWithTimeout --> TimeoutHandler

    I have read many times the request for a "Wait For" with the addition of a timeout. This class is an attempt to implement that functionality. It is a B4X class, in the sense that it can be used with B4A, B4J and B4i; after all it uses only one B4XView which is completely optional and almost...
  8. avalle

    B4J Question [Server] Wait For a SQLite data to change

    Hi, I understand how to use Wait For in a B4J Server Handler. However I have no idea how to pause a server handler class waiting for some data in a SQLite database to change. Anyone so kind to help? Thanks Andrea

    Android Question [Solved] Job with wait for into a class

    Hello, I have a lot of sub routines that execute some poststrings actions with an ASP API. So i have put the whole in a separate Code Module , like for example sending email directly via the API (its more simpler and lighter for the app) : Sub SendAnEmail(QSTT As String, QSMESS As String...
  10. S

    Android Question Multiple Runtime Permissions / Wait For.. Complete not working? RESOLVED

    I am trying to update an app that was based on the old Bluetooth example so may not take advantage of all the latest developments in program structure. I do not write programs for B4A very often as I mostly have to use Embedded C or design electronics. My apps are used to support our embedded...
  11. Steve Kwok

    Android Question Wait For inside Threading always escape

    Hi, All. I would like to download data from internet periodically by background thread. With reference to: Threading library https://www.b4x.com/android/forum/threads/threading-library.6775/, I changed the code as follow but get freezed :( Sub ThreadSub3 'Dim Count As Int = 0 Dim...
  12. rossati

    Android Question Wait for timer event

    I would like to execute some code and wait for it to complete, but I can't use Wait For sub because my application is not monolithic, so I'm trying the Timer, that is when the application ends, I start a timer for some time hoping that this may be intercepted. Unfortunately this does not work...
  13. Kevin Hartin

    Android Question Using SoundPool to make a sentence

    Hi all, I have been hacking my way through building an app with offline maps, a database of markers and alerts as a marker comes near. It is all working fine as I post an alert to the screen with all the relevant information using ToastMessageShow. What I want to add as an option is a verbal...
  14. William Lancee

    Share My Creation Number Cruncher and Statistical Package Integrator

    The principle behind this app is that "time is money". I have worked most of my life as a research scientist and consultant, and I can say that I have wasted a huge amount of time ($) because of poor software and data management tools. It is not so much that the tools don't work, they do...
  15. L

    Android Question Wait For Error. WeakReference NullPointerException

    Hi everyone, I developed in my app the comunication with a fiscal printer. I do it opening a socket and writing the comands in the stream. I load the comands in a strings array and then I write them to the fiscal printer in a loop. I have to wait the response from the fiscal printer (with the...
  16. L

    Italian Problema con Wait For Stream_newdata

    Ciao a tutti, Ho sviluppato nella mia applicazione la comunicazione con un misuratore fiscale, apro un socket su questo e scrivo i vari comandi nel flusso. Ad ogni comando inviato devo però intercettare la risposta da questo per verificarne l'esito, cosa che ho gestito con i wait for. Esempio...
  17. Sandman

    Wish [B4X] Ensure ”sender” value is always returned in Libs to enable Resumable Subs

    This Wish springs from this topic: Not possible to use Wait For with OkHttpResponse.StreamFinish? https://www.b4x.com/android/forum/threads/not-possible-to-use-wait-for-with-okhttpresponse-streamfinish.97620/ It’s absolutely not the end of the world if I can’t always use Resumable Subs. That...
  18. Sandman

    Android Question [SOLVED] Not possible to use Wait For with OkHttpResponse.StreamFinish?

    I’m using a slightly modified OkHttpUtils. (It’s modified to be more specialized when communicating with the API on my server.) In it there's an event _ResponseSuccess that contains this: ' Response is an OkHttpResponse Response.GetAsynchronously("response", File.OpenOutput(temp_folder...
  19. LucaMs

    Android Question Pause [wrong - to be deteled]

  20. CanguroCode

    B4J Question How to use 'wait for' in a Mqtt Class

    I have a mqtt class for broker connection, send messages and receive messages. The logic that I use is: 1. Client publish message to topic: "mytopic" 2. In the other side an Script is subscribed to the topic: "mytopic" 3. As soon as the message is received, the script publishes in: "response"...