You are correct.
This code will correctly convert the value:
B4X:
Sub GetBoolean(no As NativeObject, field As String) As Boolean
Dim b As Object = no.GetField(field)
Return b
End Sub
NativeObject.GetField returns a wrapped object. By assigning it to a variable of type object we can get the real object (number in this case). Then we convert it to boolean.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.