Hi,
I am trying to use an external jar for a built in rfid scanner.
The supplier of the rfid reader is Idtronic (http://www.en.idtronic-rfid.com/) and the unit I am developing for is called C4RED (http://www.en.idtronic-rfid.com/handheld-computers/c4-red)
The rfid reader is a reader for 125 kHz tags, and Idtronic has supplied the jars that are needed and I also found a Android studio example (Lf125KManager) in the SDK download.
I have tried to follow the example for the Picasso external jar in another thread, but since I am no java expert, I have got into trouble when I try to use the callback function in the jar (at least I think it's a callback function, but it is called "Handler" in the documentation and in the Android Studio example.
I have the following B4A code:
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("Main")
Dim jo As JavaObject = GetLf125Manager
Dim handler1 As Object = jo.CreateEvent("com.handheld.LF125K.handler", "SetHandler", Null)
GetLf125Manager.RunMethod("Open", handler1)
End Sub
Sub GetLf125Manager As JavaObject
Dim jo As JavaObject
Return jo.InitializeStatic("com.handheld.LF125K.Lf125KManager")
End Sub
Sub GetContext As JavaObject
Return GetBA.GetField("context")
End Sub
Sub GetBA As JavaObject
Dim jo As JavaObject
Dim cls As String = Me
cls = cls.SubString("class ".Length)
jo.InitializeStatic(cls)
Return jo.GetFieldJO("processBA")
End Sub
It is the line in bold I get a runtime error on
** Activity (main) Resume **
** Service (starter) Create **
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
Error occurred on line: 52 (Main)
java.lang.ClassNotFoundException: com$handheld$LF125K$handler
(Could not upload the C4RED SDK (file too large) but it can be found here:
http://download.idtronic.de/Handheld/C4 RED SDK.zip
)
Any help is appreciated.
Best regards
Anders Bruce
I am trying to use an external jar for a built in rfid scanner.
The supplier of the rfid reader is Idtronic (http://www.en.idtronic-rfid.com/) and the unit I am developing for is called C4RED (http://www.en.idtronic-rfid.com/handheld-computers/c4-red)
The rfid reader is a reader for 125 kHz tags, and Idtronic has supplied the jars that are needed and I also found a Android studio example (Lf125KManager) in the SDK download.
I have tried to follow the example for the Picasso external jar in another thread, but since I am no java expert, I have got into trouble when I try to use the callback function in the jar (at least I think it's a callback function, but it is called "Handler" in the documentation and in the Android Studio example.
I have the following B4A code:
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("Main")
Dim jo As JavaObject = GetLf125Manager
Dim handler1 As Object = jo.CreateEvent("com.handheld.LF125K.handler", "SetHandler", Null)
GetLf125Manager.RunMethod("Open", handler1)
End Sub
Sub GetLf125Manager As JavaObject
Dim jo As JavaObject
Return jo.InitializeStatic("com.handheld.LF125K.Lf125KManager")
End Sub
Sub GetContext As JavaObject
Return GetBA.GetField("context")
End Sub
Sub GetBA As JavaObject
Dim jo As JavaObject
Dim cls As String = Me
cls = cls.SubString("class ".Length)
jo.InitializeStatic(cls)
Return jo.GetFieldJO("processBA")
End Sub
It is the line in bold I get a runtime error on
** Activity (main) Resume **
** Service (starter) Create **
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
Error occurred on line: 52 (Main)
java.lang.ClassNotFoundException: com$handheld$LF125K$handler
(Could not upload the C4RED SDK (file too large) but it can be found here:
http://download.idtronic.de/Handheld/C4 RED SDK.zip
)
Any help is appreciated.
Best regards
Anders Bruce