Hi,
We have a java app that connects to a Cardterminal that has the name "se.iqpd.checkout.companion". We start that in B4A with the following code.
We send the return with following JAVA-code
But in B4A we get a error, nothing returns.
Why is that, anyone knows?
// TMS
We have a java app that connects to a Cardterminal that has the name "se.iqpd.checkout.companion". We start that in B4A with the following code.
B4X:
Dim ISMP_Intent As Intent
Dim InstalledPackages As PackageManager
ISMP_Intent = InstalledPackages.GetApplicationIntent("se.iqpd.checkout.companion")
ISMP_Intent.PutExtra("JobId","31271")
ISMP_Intent.PutExtra("TransactionType","Purchase")
ISMP_Intent.PutExtra("Amount",NumberFormat2(SubTotal_Double-SubTotal_Discount_Double,1,2,2,False))
StartActivityForResult(ISMP_Intent)
We send the return with following JAVA-code
B4X:
Intent output = new Intent();
output.putExtra("RESULT", RESULT_OK);
[....] ' Lots of otherresultdata that we cant post because of confidentiallity agreement
getParent().setResult(Activity.RESULT_OK, output);
finish();
But in B4A we get a error, nothing returns.
main_companion_event (B4A line: 1984)
ResultCode = Args(0)
java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
at se.iqpd.checkout.plus.main._companion_event(main.java:4069)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:175)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:159)
at anywheresoftware.b4j.object.JavaObject$1.invoke(JavaObject.java:191)
at $Proxy0.toString(Native Method)
at java.lang.String.valueOf(String.java:1649)
at anywheresoftware.b4a.debug.Debug.objectToString(Debug.java:384)
at anywheresoftware.b4a.debug.Debug.writeGlobals(Debug.java:303)
at anywheresoftware.b4a.debug.Debug.sendBPData(Debug.java:284)
at anywheresoftware.b4a.debug.Debug.access$9(Debug.java:279)
at anywheresoftware.b4a.debug.Debug$1.run(Debug.java:256)
at android.os.Handler.handleCallback(Handler.java:725)
at android.os.Handler.dispatchMessage(Handler.java:92)
at anywheresoftware.b4a.Msgbox.waitForMessage(Msgbox.java:200)
at anywheresoftware.b4a.Msgbox.debugWait(Msgbox.java:158)
at anywheresoftware.b4a.debug.Debug.wait(Debug.java:213)
at anywheresoftware.b4a.debug.Debug.reachBP(Debug.java:260)
at anywheresoftware.b4a.debug.Debug.ShouldStop(Debug.java:232)
at se.iqpd.checkout.plus.main._unitevents_batterychanged(main.java:23572)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:175)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:159)
at anywheresoftware.b4a.phone.PhoneEvents$ActionHandler$1.run(PhoneEvents.java:321)
at android.os.Handler.handleCallback(Handler.java:725)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5279)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
at dalvik.system.NativeStart.main(Native Method)
Why is that, anyone knows?
// TMS