简体   繁体   中英

Windows phone 8.1 background task abrupt exit

I am Working on windows phone 8.1 background tasks API. As see in all the other threads of background task API here on stack overflow, there is no definite answer to how long the background task runs, as in we cannot map the 2 CPU seconds to the wall clock time. That means it can exit abruptly.

So my question is, is there an handler that we can use to make sure that the application see why the background task ended abruptly. Probably log the events of action and reason for the exit ?

I just use console.log while the background task is running, keeping in debug mode to see the console, and can therefore pinpoint exactly where the background task crashed. Once you know where, validate your code and look for any errors. If you find none, you probably ran out of memory and the task was cancelled.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM