Basic4android v1.92 is released!

Erel

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 [email protected] 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.
 

Informatix

Expert
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

Kevin

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(MotionEvent.java:1670)
at android.view.ViewRootImpl.finishMotionEvent(ViewRootImpl.java:3111)
at android.view.ViewRootImpl.deliverPointerEvent(ViewRootImpl.java:3102)
at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2614)
at android.view.ViewRootImpl.processInputEvents(ViewRootImpl.java:978)
at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2623)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4507)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557)
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
Top