The solution is to use a service for this. The service will not be paused. If the relevant activity is in the background then store the data until the activity is resumed.
(Sorry for my bad English)
I think that you dont understood the problem or I didn't explain well. Don't get me wrong.
For example, imagine that the first Activity1 have a textbox and you write something. When you click the button, opens the Activity2 and the Activity2 makes the REST request to the server, and show the data.
Well, If you exit the Activity2 very fast, the Activity2 goes to pause, but it takes time to close the Activity2. In this time, the value for Ispaused(Me), is false, but goes to true in 1 second or less.
If in this interval of time, the response of the server reach the app, Activity2 goes to foreground.
The problem is this. IsPaused takes time to change the value.
I dont undestand how to use a service for do this.
I tried this, but not works.
Sub JobDone (Job As HttpJob)
If Job.Success = True AND Not(IsPaused(Me)) Then
Select Job.JobName
Case "jobListarGrupos"
...
Is there another method to know if the Activity is in foreground?