Continuing from https://www.b4x.com/android/forum/t...anfred-service-intent-must-be-explicit.89147/
Some strange behaviour here (in v0.2).
At first, I could access:
device.DeviceType = null
device.DefaultMsg = "Swipe Card please"
I had errors when trying to access device.DeviceActivated, .DeviceConnected and .DeviceReadyForSwipe:
In Activity_Create I have:
I tried device.requestSwipe and it made no difference.
I wanted to call pg.keepAlive in swipe_onDeviceReadyForSwipe so I moved my "Dim" to "Sub Globals".
Before that my code ran well, and swipe_onDeviceDisconnected, swipe_onDeviceConnected and swipe_onDeviceReadyForSwipe worked just fine.
Then I got this error:
So I moved my Dim statement back to Activity_Create - and I STILL get the same error message.
This now happens for all of my 3 events. I have restarted B4A and restarted my tablet, but the code has completely stopped working.
To confirm - the code worked before, and after moving the Dim statement to Sub Globals and back to Activity_Create - the identical code has stopped working.
The code is
Some strange behaviour here (in v0.2).
At first, I could access:
device.DeviceType = null
device.DefaultMsg = "Swipe Card please"
I had errors when trying to access device.DeviceActivated, .DeviceConnected and .DeviceReadyForSwipe:
B4X:
java.lang.RuntimeException: Method: getDeviceReadyForSwipe not found in: com.SafeWebServices.PaymentGateway.PGSwipeIPS
java.lang.RuntimeException: Method: getDeviceConnected not found in: com.SafeWebServices.PaymentGateway.PGSwipeIPS
java.lang.RuntimeException: Method: getDeviceActivated not found in: com.SafeWebServices.PaymentGateway.PGSwipeIPS
In Activity_Create I have:
B4X:
Dim pg As SwipeController
pg.Initialize("swipe", 30, True, True, "IPS")
I tried device.requestSwipe and it made no difference.
I wanted to call pg.keepAlive in swipe_onDeviceReadyForSwipe so I moved my "Dim" to "Sub Globals".
Before that my code ran well, and swipe_onDeviceDisconnected, swipe_onDeviceConnected and swipe_onDeviceReadyForSwipe worked just fine.
Then I got this error:
B4X:
java.lang.IllegalArgumentException: method lstw.swiper.main._swipe_ondevicereadyforswipe argument 1 has type de.donmanfred.PGSwipeDeviceWrapper, got com.SafeWebServices.PaymentGateway.PGSwipeIPS
So I moved my Dim statement back to Activity_Create - and I STILL get the same error message.
This now happens for all of my 3 events. I have restarted B4A and restarted my tablet, but the code has completely stopped working.
To confirm - the code worked before, and after moving the Dim statement to Sub Globals and back to Activity_Create - the identical code has stopped working.
The code is
B4X:
Sub swipe_onDeviceReadyForSwipe(device As SwipeDevice)
Label1.Text = "Ready for swipe"
End Sub