Understanding this Java Object thing is driving me nuts !!!
I have the following sub
I get : java.lang.IllegalArgumentException: expected receiver of type android.hardware.usb.UsbManager, but got java.lang.Class<android.hardware.usb.UsbManager> on the line Private mgr....
So I must be doing something really stupid, as most of my tests with Java Object are leading to similar results.
What am I referencing wrong ?
Thanks
I have the following sub
B4X:
Sub test As JavaObject
Private jo As JavaObject
jo.InitializeStatic("android.hardware.usb.UsbManager")
Private mgr As JavaObject =jo.RunMethod("getAccessoryList",Null)
Return mgr
End Sub
I get : java.lang.IllegalArgumentException: expected receiver of type android.hardware.usb.UsbManager, but got java.lang.Class<android.hardware.usb.UsbManager> on the line Private mgr....
So I must be doing something really stupid, as most of my tests with Java Object are leading to similar results.
What am I referencing wrong ?
Thanks