It is not a problem. It happens when an asynchronous event is raised when the activity is paused. For example you have started downloading a file and the user pressed on the Home button. The event will be raised before Activity_Resume.
sending message to waiting queue (astreams_terminated)
After a while, I get the
running waiting messages (1)
. Now, if I understand correctly, in this case, the astreams_terminated will be performed upon activity_resume? But in my case, I have to debug this termination (by appropriate code inside this sub) in order for the next activity to get valid data. Am I missing something here?
The activity is in the foreground. I would use a service, no problem, BUT, what I do is this: I have a spinner. SpinnerClicked sends id to the server. Server responds with some data. These data appear on the very same activity. If I use a service, I will have to feed data from the service. Apparently this is a cost in execution time. So far, everything works quite well with a response as small as 200ms. The 'sending to cue' message, I strongly suspect is raised because of a closeStreams that I use. Thus, I would kindly ask, why should we take the terminatedEvent to the queue since I've already closed the stream and socket? If this is how it is supposed to be, I will have to reorganize the communication and possibly replace asynchronous streams with direct ones. After all, I send and get no more than a kb, which I can surely handle its transmission being verified