I am developing an android application that rely very much on internet, I retrieve data frequently using this RestClient Class, that wrap some detail on using DefaultHttpCli
Use the threading primitives. Have a flag running and set it to true initially. Do your REST requests in a while(running) loop.
running
true
while(running)
In your onPause(), set the running flag to false.
onPause()
false