Hi all,
I'm making Http-Post Requests on my app and receive them in the Sub "JobDone". How can I cancel the event, when the user presses the "BACK" button?
Because if I don't cancel the Job and the user has already exited the Activity, the Activity re-opens and causes a bug opening and closing the Activity infinitely.
Sub ExecuteRemoteQuery(query As String, JobName As String)
Dim jobs As HttpJob
jobs.Initialize(JobName, Me)
jobs.PostString("XXXXXXXXXXXXXXXXX/include/config.php", query)
End Sub
EDITIT: I have now used:
B4X:
StopService(HttpUtils2Service)
But when I press the back button and the app passes through this code, the app crashes with an NullPointerException.