I am building a WP7 app. I want to reset my app data settings at a given time. I have tried resetting by comparing the hour of the given time and “DateTime.Now.Hour” when the Main Page loads(i.e. when I open the app at the given time). But if I open the app after the given time, it doesn’t reset at all. So, I want to know if there is any way to solve this. I haven’t used Background Worker before but I think it can help. Can somebody suggest me a way out of it?.
Thanks in advance
You cannot run apps permanently in the background on Windows Phone. When your app launches or is activated you should check if the delete time has passed (
DateTime.Now > deleteTime).You could consider using a background agent that can run every 30 mins, but beware the limitations especially on 256MB devices.