开发者

Does a Thread launched by Activity continue running once the device goes to sleep?

This is somewhat similar to App seems to stop working when the screen goes to sleep however they discuss an AsyncTask while in my situation it is a plain Thread.

So let's say an activity starts a Thread, and then the pho开发者_StackOverflowne goes to sleep, does the thread continue execution?


Not unless you have a wakelock. (It does continue to run if your activity goes to the background, but might be killed at any time the foreground activity requires more resources.)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜