Basic4android v1.92 is released!


B4X founder
Staff member
Licensed User
Longtime User
Basic4android v1.92 is now available. All users who previously run v1.90 can download this update.

You should use the same link and password as the one used to download v1.90.
Please contact if you have lost the previous mail.

This update fixes the following issues:
- DoEvents / Msgbox crash the application on Android 4.0.3 and above when used inside Panel_Touch event and some other touch related events.
- Starting the Bluetooth bridge hangs the IDE.
- HorizontalCenter returns the wrong value in the designer script.
- The designer script variant code is not executed if there is no general code.
- Basic4android is now compatible with Designer4android layout files.
- (Libraries developers) BA.raiseEventFromUI - new method to raise events from inside a native UI. The event is raised by posting a message to the message queue. This fixes the DoEvents / Msgbox issue in Android ICS.
- Other minor fixes.

- Panel_Touch event return value is now ignored.

If you have customized B4A.xml then do not forget to backup it before installing the new version.


Licensed User
Longtime User
You can use Reflection library with AddTouchListener instead of Panel_Touch to keep the previous behavior. It will work properly as long as you don't call DoEvents or Msgbox in the event sub.

This change was required due to a change in Android 4.0.3.

I have a lot of MsgBox in my touch events. That's why I have no perfect solution actually. I'm going to write my own library to handle this mess. A lot of coding days lost...
Upvote 0


Well-Known Member
Licensed User
Longtime User
I had been under the impression that the MotionEvent.recycle error should not come up if only using button click events but I saw an error in my latest app version (built with 1.90) the other day.

I know I don't use anything fancy... only button clicks. I haven't had a chance to pull up the java source and find the line that caused it, but it was a bit of a surprise to see that error since I thought my app was immune. I hope that the entire problem was fixed in 1.92 and that there isn't some other cause that hasn't been addressed because it was unknown. :(

java.lang.RuntimeException: MotionEvent { action=ACTION_UP, id[0]=0, x[0]=355.0, y[0]=357.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=94878558, downTime=94878333, deviceId=3, source=0x1002 } recycled twice!
at android.view.MotionEvent.recycle(
at android.view.ViewRootImpl.finishMotionEvent(
at android.view.ViewRootImpl.deliverPointerEvent(
at android.view.ViewRootImpl.handleMessage(
at android.view.ViewRootImpl.processInputEvents(
at android.view.ViewRootImpl.handleMessage(
at android.os.Handler.dispatchMessage(
at android.os.Looper.loop(
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(
at dalvik.system.NativeStart.main(Native Method)

I can't remember what all I added to that latest version but I had never seen that error come up at all in previous versions of my app. :confused:

Could this event be part of another view such as panel, scrollview, etc and something "internal", that I am not directly handling with an event?
Upvote 0