Hi, I was developping an app on KitKat, and works ok, but it required to run on Gingerbread.
Lets say there are 3 Activities, Main, acmanual, acresultados.
First, Main uses the ZXing to read a QR code and then passes the results to acmanual using CallSubDelayed.
acmanual uses an http job to validate this data with a server and gets a response. Then, this response is sent to acresultados just for showing to the user.
All of this is working great on kitkat, but then, when running on Gingerbread the app crashes with this log:
I added a breakpoint on acmanual and all works, the data is returnend from the server, CallSubDelayed2 and Activity.Finish are executed. But then, the app crashes.
The intriguing part, is that the log says:
** Activity (acresultados) Create, isFirst = true **
** Activity (acresultados) Resume **
** Activity (acresultados) Pause, UserClosed = true **
But if I put a breakpoint on Create or Resume, the code is never executed.
Code on acmanual:
Anyone have any Idea of why this crashes?
Thanks
Lets say there are 3 Activities, Main, acmanual, acresultados.
First, Main uses the ZXing to read a QR code and then passes the results to acmanual using CallSubDelayed.
acmanual uses an http job to validate this data with a server and gets a response. Then, this response is sent to acresultados just for showing to the user.
All of this is working great on kitkat, but then, when running on Gingerbread the app crashes with this log:
B4X:
(Intent) Intent { act=android.intent.action.MAIN flg=0x20000000 cmp=com.ioxsoft.cif.validador.plus/.main }
no extras
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
QR_CODE:https://siat.sat.gob.mx/app/qr/faces/pages/mobile/validadorqr.jsf?D1=10&D2=1&D3=12345678900_MEE040309AX1###myzx_result
sending message to waiting queue (OnActivityResult)
running waiting messages (1)
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (acmanual) Create, isFirst = true **
** Activity (acmanual) Resume **
** Service (httputils2service) Create **
** Service (httputils2service) Start **
** Activity (acmanual) Pause, UserClosed = true **
** Activity (acresultados) Create, isFirst = true **
Error occurred on line: 41 (acmanual)
java.lang.RuntimeException: Unexpected command: 0
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:373)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:238)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:121)
at com.ioxsoft.cif.validador.plus.acresultados.afterFirstLayout(acresultados.java:98)
at com.ioxsoft.cif.validador.plus.acresultados.access$100(acresultados.java:16)
at com.ioxsoft.cif.validador.plus.acresultados$WaitForLayout.run(acresultados.java:76)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3687)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
at dalvik.system.NativeStart.main(Native Method)
** Activity (acresultados) Resume **
** Activity (acresultados) Pause, UserClosed = true **
sending message to waiting queue (show_resultado)
I added a breakpoint on acmanual and all works, the data is returnend from the server, CallSubDelayed2 and Activity.Finish are executed. But then, the app crashes.
The intriguing part, is that the log says:
** Activity (acresultados) Create, isFirst = true **
** Activity (acresultados) Resume **
** Activity (acresultados) Pause, UserClosed = true **
But if I put a breakpoint on Create or Resume, the code is never executed.
Code on acmanual:
B4X:
CallSubDelayed(AcResultados, "Show_Resultado")
Activity.Finish
Anyone have any Idea of why this crashes?
Thanks