N NightRaven Member Jan 27, 2022 #1 Do you have any sample how to do HTTP job request at the starter service that can be called from an activity? Thank You
Do you have any sample how to do HTTP job request at the starter service that can be called from an activity? Thank You
N NightRaven Member Jan 27, 2022 #2 NightRaven said: Do you have any sample how to do HTTP job request at the starter service that can be called from an activity? Thank You Click to expand... I want to do this because my current solution is I use httpjob request inside an activity to check connection to a server but if I switch to other activity after some time it will return unexpectedly to the activity where I called httpjob. I know that B4Xpages will prevent this but it takes time to convert all the codes to b4xpages Upvote 0
NightRaven said: Do you have any sample how to do HTTP job request at the starter service that can be called from an activity? Thank You Click to expand... I want to do this because my current solution is I use httpjob request inside an activity to check connection to a server but if I switch to other activity after some time it will return unexpectedly to the activity where I called httpjob. I know that B4Xpages will prevent this but it takes time to convert all the codes to b4xpages
Erel B4X founder Staff member Licensed User Longtime User Jan 27, 2022 #3 NightRaven said: I know that B4Xpages will prevent this but it takes time to convert all the codes to b4xpages Click to expand... This is indeed the correct solution. NightRaven said: Do you have any sample how to do HTTP job request at the starter service that can be called from an activity? Click to expand... Making the http request is simple. Just call a sub that makes the request. I guess that you are having trouble with getting the result, right? This is indeed difficult with non-B4XPages projects. You can use CallSubDelayed to call a sub in the activity, however you should first check whether it is visible with IsPaused(Activity17). Otherwise it will start the activity. Upvote 0
NightRaven said: I know that B4Xpages will prevent this but it takes time to convert all the codes to b4xpages Click to expand... This is indeed the correct solution. NightRaven said: Do you have any sample how to do HTTP job request at the starter service that can be called from an activity? Click to expand... Making the http request is simple. Just call a sub that makes the request. I guess that you are having trouble with getting the result, right? This is indeed difficult with non-B4XPages projects. You can use CallSubDelayed to call a sub in the activity, however you should first check whether it is visible with IsPaused(Activity17). Otherwise it will start the activity.