OK, so I can pass an array of 1 boolean from my Java library code to be passed to B4A code, such as:
Boolean [] doContinue = { true };
raiseEventFromDifferentThread(null, this, myTask, eventName + "_download2completed", false, new Object[] {doContinue});
if (doContinue[0])
{
//do something: the user decided to continue
}
in the B4A event code I could modify:
doContinue(1) = false;
However: will this work ? Or would there be a synchronization problem (the library code and the UI code running on different threads) ? In other words: will the raiseEventFromDifferentThread block until the B4A event code has been fully executed ?
Thanks !