Hello,
I'm having an issue with HttpJob that I believe is pausing my activity (scSignup)... but for some reason is calling back my Main activity prior to calling the activity it was "called from" (the HttpJob is actually in a Service module).
There is no Activity.Finish or similar code that could quit the current activity.
Any ideas on how to avoid that behavior? I don't want Main activity to be called!
I already tried:
- Moving the HttpJob to a class
- Moving the HttpJob to each activity
- Moving the HttpJob to Starter service
- Using HttpRequest and HttpClient instead of HttpJob
All of the above reproduces the issue.
Below is the debugging flow:
Current activity = scSignup
* user clicks on Send signup *
Call Service's Sub: Send Data
Call scSignup's Sub: Show Waiting Dialog
* Waiting Dialog is shown very briefly *
* Service Sub Send Data steps in - Http.PostString is called *
* Current Activity (scSignup) is Paused *
* Activity Main is recreated *
* Activity Main is paused *
* Activity scSignup is recreated *
Below is the log:
Here it saves the signup settings internally
** Activity (scsignup) Pause, UserClosed = false **
Here it saves the signup state using StateManager, because Activity_Pause was called
Killing previous instance (main).
** Activity (main) Create, isFirst = false **
** Activity (main) Resume **
Here it calls JobDone
** Activity (main) Pause, UserClosed = false **
sending message to waiting queue (b4xserializator_bytestoobject)
Killing previous instance (scsignup).
** Activity (scsignup) Create, isFirst = false **
running waiting messages (1)
** Activity (scsignup) Resume **
I'm having an issue with HttpJob that I believe is pausing my activity (scSignup)... but for some reason is calling back my Main activity prior to calling the activity it was "called from" (the HttpJob is actually in a Service module).
There is no Activity.Finish or similar code that could quit the current activity.
Any ideas on how to avoid that behavior? I don't want Main activity to be called!
I already tried:
- Moving the HttpJob to a class
- Moving the HttpJob to each activity
- Moving the HttpJob to Starter service
- Using HttpRequest and HttpClient instead of HttpJob
All of the above reproduces the issue.
Below is the debugging flow:
Current activity = scSignup
* user clicks on Send signup *
Call Service's Sub: Send Data
Call scSignup's Sub: Show Waiting Dialog
* Waiting Dialog is shown very briefly *
* Service Sub Send Data steps in - Http.PostString is called *
* Current Activity (scSignup) is Paused *
* Activity Main is recreated *
* Activity Main is paused *
* Activity scSignup is recreated *
Below is the log:
Here it saves the signup settings internally
** Activity (scsignup) Pause, UserClosed = false **
Here it saves the signup state using StateManager, because Activity_Pause was called
Killing previous instance (main).
** Activity (main) Create, isFirst = false **
** Activity (main) Resume **
Here it calls JobDone
** Activity (main) Pause, UserClosed = false **
sending message to waiting queue (b4xserializator_bytestoobject)
Killing previous instance (scsignup).
** Activity (scsignup) Create, isFirst = false **
running waiting messages (1)
** Activity (scsignup) Resume **