Forum Discussion
TheEndless
14 years agoChannel Surfer
"roquoonewbie" wrote:
I think that is the route I have to go. Is there any sample code that demonstrates how to kick off some web requests, while listening for an event (whether that is a back button or on screen button event), and canceling the web request process to go back a screen if one of those events happen?
I am having trouble killing the web request process when I get the event.
I think you want to look at roUrlTransfer.AsyncGetToString and roUrlTransfer.AsyncCancel. Listen on the same port as your message dialog, and you should be good to go. Take a look at the http_get_to_string_with_timeout function in the urlUtils.brs file in the videoplayer SDK app for an example.