Previous thread: https://www.b4x.com/android/forum/threads/paygate-by-donmanfred-event-question.89144/
We are a big step forward. First, I got it wrong about being an IDTECH Shuttle. The device just says "MAGTEK", that's all. It's actually the "IPS" device.
The permissions were set correctly, and having the "res" folder seemed to make a difference.
The error message is now
The most relevant thread I can find is https://www.b4x.com/android/forum/threads/dealing-with-intents-and-broadcast-receiver.44465/ - but "BroadCastReceiver" is an unknown object.
We are a big step forward. First, I got it wrong about being an IDTECH Shuttle. The device just says "MAGTEK", that's all. It's actually the "IPS" device.
IPS Enterprise and IPS Encrypted Card Readers
The IPS devices are audio jack-connected card readers. Unlike the IDTECH Shuttle, these readers are powered by an internal battery. The IPS devices have a fast startup time and do not produce a constant tone through the audio jack.
Because the IPS devices connect through the audio port and there is no way to immediately detect the device type, you will receive a deviceConnected: event even if the user has only plugged in headphones. Since there is no activation with the IPS devices, a deviceActivated: and deviceBecameReadyForSwipe: will also be sent immediately. In order to be sure that the device is an IPS Enterprise or IPS, the PGSwipeIpsEnterprise and PGSwipeIps provide a beginTestCommunication: method you can use to attempt to communicate with the devices. Success is returned when the device has been successfully identified. This is not done by default to eliminate a delay before the device becomes active.
The permissions were set correctly, and having the "res" folder seemed to make a difference.
The error message is now
** Activity (main) Create, isFirst = true **
Error occurred on line: 40 (Main)
java.lang.IllegalArgumentException: Service Intent must be explicit: Intent { act=android.intent.action.HEADSET_PLUG launchParam=MultiScreenLaunchParams { mDisplayId=0 mBaseDisplayId=0 mFlags=0 } }
at android.app.ContextImpl.validateServiceIntent(ContextImpl.java:1391)
at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1428)
at android.app.ContextImpl.startService(ContextImpl.java:1404)
at android.content.ContextWrapper.startService(ContextWrapper.java:673)
at com.gdseed.mobilereader.MobileReader.<init>(Unknown Source)
at com.SafeWebServices.PaymentGateway.PGSwipeIPS.InitializeReader(PGSwipeIPS.java:30)
at com.SafeWebServices.PaymentGateway.PGSwipeController.startIPS(PGSwipeController.java:74)
at com.SafeWebServices.PaymentGateway.PGSwipeController.<init>(PGSwipeController.java:41)
at de.donmanfred.SwipecontrollerWrapper.Initialize(SwipecontrollerWrapper.java:122)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runVoidMethod(Shell.java:755)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:345)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:249)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:139)
at lstw.swiper.main.afterFirstLayout(main.java:102)
at lstw.swiper.main.access$000(main.java:17)
at lstw.swiper.main$WaitForLayout.run(main.java:80)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6776)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1496)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1386)
The most relevant thread I can find is https://www.b4x.com/android/forum/threads/dealing-with-intents-and-broadcast-receiver.44465/ - but "BroadCastReceiver" is an unknown object.