Hello,
I'm going crazy with this problem.
I have a second activity in an app which makes CallSubs to a service in response to a button click. When button click routine exits, for some reason the second activity pauses and the main activity resumes.
Below is a little snippet of code (I can't post the full code) and the output I receive in the unfiltered logs when executing this portion of the code.
In the code, note that I've tried both CallSubDelayed3 and CallSub3. One or the other is commented. If I comment both, the activity doesn't pause and main is not restarted.
The first two lines of the unfiltered log output show what happens. The activity vpsact is paused for some unknown reason and the main activity is restarted.
The NetSvr service is almost identical to Erel's tutorial NetSvc. The first parameter is a byte. The second parameter is a byte array.
Any ideas or places I should look to find out why CallSub seems to be pausing the activity?
Thanks,
Barry.
I'm going crazy with this problem.
I have a second activity in an app which makes CallSubs to a service in response to a button click. When button click routine exits, for some reason the second activity pauses and the main activity resumes.
Below is a little snippet of code (I can't post the full code) and the output I receive in the unfiltered logs when executing this portion of the code.
B4X:
si(1) = TchRec.l
si(2) = TchRec.t
si(3) = TchRec.r
si(4) = TchRec.b
For i = 0 To sa.Length - 1
si(0) = sa(i)
Dim b() As Byte
b = bc.ShortsToBytes(si)
' CallSubDelayed3(NetSvr, "SendCmd", NetSvr.C_VPInfo, b)
CallSub3(NetSvr, "SendCmd", NetSvr.C_VPInfo, b)
Next
B4X:
Activity (vpsact) Pause, UserClosed = false **
Killing previous instance (main).
** Activity (main) Create, isFirst = false **
Class not found: canalrun.apps.shuttle.txtwnd, trying: canalrun.apps.t3host.txtwnd
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = true **
In the code, note that I've tried both CallSubDelayed3 and CallSub3. One or the other is commented. If I comment both, the activity doesn't pause and main is not restarted.
The first two lines of the unfiltered log output show what happens. The activity vpsact is paused for some unknown reason and the main activity is restarted.
The NetSvr service is almost identical to Erel's tutorial NetSvc. The first parameter is a byte. The second parameter is a byte array.
Any ideas or places I should look to find out why CallSub seems to be pausing the activity?
Thanks,
Barry.