开发者

Problem delaying doingbackground in asyncTask !

I have a problem using AsyncTask. I want my doing background send data to server via GET (success) BUT (Problem) when there is no connection i have to resend three time before save in my sqlite>? how can i do that开发者_JAVA技巧 ?

PS : before resend we have to let our doing background sleep(HOW?) for abit.

Thx


Threading rule for AsyncTask:

Only once execution can be performed, any other attempt (to resume) will throw exception. (see docs)

There you can't sleep() in AsyncTask

For that purpose you can create BroadcastReciever that will listen for connectivity changes.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜