jamesmcroft / microsoft-band-background-task-sample

A Microsoft Band Windows Phone sample for using background tasks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stopping the task

qmatteoq opened this issue · comments

Hello James,
did you find a way to stop the background task once it's started?
I've tried to call the method to unregister the task, but it isn't enough: until I switch off the phone, the background task keeps running.

Thanks!

Thanks anyway, I've found a way: when you call the Unregister() method, you can pass a parameter to tell if you want to cancel the taks in case it's running or not. In your sample it's set to false, this is why I wasn't able to see the task terminating.