i need implement such behaviour. polling remote web server period of time, checking condition in response server, example variable condition.
more specific, consider example. need poll server every 5 secodns during 5 minutes , fail. there great feature in robospice library - retrypolicy, need.
has getretrycount, getdelaybeforeretry methods. need implement task.
need perform retries when result code http::ok. in case have make delays inside activities, , send new request there, better separate logic inside other class , in service.
need middleware handle responses server.
don't robospice library maybe there way this.
please suggest best way this, thank you.
you can achieve using okhttp extension of robospice. check out this example response analysis @ lower level.
Comments
Post a Comment