Question

I want to ask how alarm applications work on mobile. As it doesn't drain battery, and i think in my problem (below) i can use same approach. And i don't know how to use background service, that it executes the main application with given period. I have to calculate something each time period which user inputs. And if the result is the same as user wants (user inputs it too) i need to show him about result. How i must make application: two apart applications (timer/calculator and input/output) or one application ? and if i write two apart applications, the 1st timer/calculator must be like console application?

And my main question: how to set "something" to given period, that with it i know that my calculator will calculate something with given period? P.S. Sorry for my English. And sorry for my mistakes if there are any

Was it helpful?

Solution

You can't run in the background for an arbitrary time on Windows Phone. You can only run periodically (once every 30 minutes for 25s max execution time). And even then you're not guaranteed to run at all if:

  • you previously crashed twice.
  • the user turned your service off.
  • battery saver is on. ...

See https://stackoverflow.com/a/13520869/694641 for more details of what is possible when your app is not in the foreground.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top