D devmobile Active Member Licensed User May 10, 2017 #1 Hello I use httputil in my project When i use it in Activity A and goto activity B,it return to Activity A auto Why? I dont need to return to previous activity when it is pause
Hello I use httputil in my project When i use it in Activity A and goto activity B,it return to Activity A auto Why? I dont need to return to previous activity when it is pause
DonManfred Expert Licensed User Longtime User May 10, 2017 #2 JobDone is raised in the Module which starts the Download. If you atart it in ActA it will return in ActA. You can use a Service, do all the Communication in this service. And in JobDone (in the service) you can send the Result to the Activity if it is already in foreground. Or even to ignore the result if you switched the Activity in the meantime. Upvote 0
JobDone is raised in the Module which starts the Download. If you atart it in ActA it will return in ActA. You can use a Service, do all the Communication in this service. And in JobDone (in the service) you can send the Result to the Activity if it is already in foreground. Or even to ignore the result if you switched the Activity in the meantime.
Erel B4X founder Staff member Licensed User Longtime User May 10, 2017 #3 DonManfred said: JobDone is raised in the Module which starts the Download. Click to expand... Small clarification. You can choose where the event will be raised: Code: Copy Dim j As HttpJob J.Initialize("name", Me) 'the second parameter can be a different module As you wrote, a service should be used instead of an Activity. The starter service is a good option. Upvote 0
DonManfred said: JobDone is raised in the Module which starts the Download. Click to expand... Small clarification. You can choose where the event will be raised: Code: Copy Dim j As HttpJob J.Initialize("name", Me) 'the second parameter can be a different module As you wrote, a service should be used instead of an Activity. The starter service is a good option.