Dear Erel!
I found out that
If(i Mod 2) doesn't produce any B4A compiler error, neither does it fail the java compilation. This error occurs when I start my application:
An error occured in sub:******** (java line: xxx). java.lang.RuntimeException: Cannot parse: 0 as boolean.
For the ones like me who didn't understand at first, the correct syntax is:
i Mod 2 = 0.
I couldn't understand where do I have booleans in my code so I opened the java file and found the following:
if (BA.ObjectToBoolean((_i%2))) {
If I correct the B4A syntax, I get this: (which is pretty much better and valid)
Erel, please check it out as others may encounter it too.
A kind of suggestion, you may also add
if(i Mod 2) to default to = 0
)
Hope this report helps.