Yes, there are many times when I would have needed to use In situ inline java.
Here's a quick example.
I wanted to check the performances of two different bits of code, identical functionally.
These instructions are called a great many times within my code.
There were cases where scenario 2 was better than 1 (1.5 plus rapide) and I wanted to test these within my application.
However the Java source code produced by BA4 is tremendously slower than the hand-coded one, compared to what I had when I tested from Android Studio. I could not compare performance within my B4A app.
Java code
' dx, dxa, dy, dya are integers
' in essence, assign the absolute value of dx to dxa, but without using ABS() which is very slow.
'scenario 1
dxa = dx < 0 ? -dx : dx;
'vs
'scenario 2
dxa = (dx ^ (dx >> 31)) - (dx >> 31);
B4A code
'1
If dx < 0 Then dxa = -dx Else dxa = dx
'vs
'2
dxa = Bit.Xor(dx, (Bit.ShiftRight(dx,31)) - Bit.ShiftRight(dx, 31))