Hi all
I have two activities in an app. Activity1 and Activity2
The Activity1 calls to Activity2 clicking in a button.
The Activity2 calls a REST service with this code:
Well, the problem is than if you exit the Activity2 pressing the BACK KEY, or with a button, ... if the respones of the REST server returns to the app, when you are in the Activity1, the app show the Activity2, even its closed.
I tried to use a variable two know if the Activity2 is shown but not works. The IsPaused didn't work too.
Anyone can help me?
Thanks in average.
I have two activities in an app. Activity1 and Activity2
The Activity1 calls to Activity2 clicking in a button.
The Activity2 calls a REST service with this code:
B4X:
Sub ObtenerObjetivo()
jobMapa.Initialize("ObtenerObjetivo", Me)
jobMapa.PostString("http://somedomain.com/REST/myapp/v1/obtenercoordenadasobjetivo","idgrupo=" & InicioServicios.globalIdGrupo)
jobMapa.GetRequest.SetHeader("Authorization", InicioServicios.globalApiKey)
End Sub
Sub JobDone (job As HttpJob)
If job.Success = True Then
Select job.JobName
Case "ObtenerObjetivo"
Try
...
End Try
End If
End Sub
Well, the problem is than if you exit the Activity2 pressing the BACK KEY, or with a button, ... if the respones of the REST server returns to the app, when you are in the Activity1, the app show the Activity2, even its closed.
I tried to use a variable two know if the Activity2 is shown but not works. The IsPaused didn't work too.
Anyone can help me?
Thanks in average.
Last edited: