Android Question Upgraded to v8.3 and Threading library fdoes not work

JohnK

Active Member
Licensed User
Longtime User
I just upgraded to v8.3 from v3.2. I remember a few years back I tested the threading Library and it worked as expected. I did not have a specific need for it at the time, so have no old projects apart from the demo. I now have a need to use it, so did; however it did not work.

I am using the v1.1 threading library https://www.b4x.com/android/forum/threads/threading-library.6775/

So I loaded the test project from the thread, and ran that, and it also does not work. I have tried 2 different devices (N5 running Oreo, and an GT-i9506 running Nougat, and the emulator running 5.1.1). Nothing seems o occur. The only thing I notice is that when I press one of the buttons in the emulator, the text box loses focus.

What could be wrong?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
1. The Threading library should work with v8.30. Make sure to run it in Release mode (not obfuscated and not debug).

2. In almost all cases it is a mistake to use the Threading library. B4A has evolved a lot since v3.2. All the slow operations have async versions that make it very simple to run things in the background.
 
Upvote 0

JohnK

Active Member
Licensed User
Longtime User
1. The Threading library should work with v8.30. Make sure to run it in Release mode (not obfuscated and not debug).
Ha! I knew it was something I did. I am pretty sure I tried it in both debug AND obfuscated.

2. In almost all cases it is a mistake to use the Threading library. B4A has evolved a lot since v3.2. All the slow operations have async versions that make it very simple to run things in the background.
I am trying to run a shell script in SU mode. I am using Phone.Shell method to execute the script, and just checked, and found there is also a Phone.ShellAsync. I'll switch the code over, thanks. The first pass was done very quickly and was not looking for new methods. My bad.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…