Reputation: 361
I have gone through various articles on Background Tasks. But none could solve my use case: Running a service infinitely on Windows Phone
1) Is it even possible to do that (consider that I have the OEM Account with Microsoft).
2) I know this is wrong as it would drain the battery, etc... but is it even possible.
3) Also the service should start when the phone starts up.
4) I have read about registering background tasks which run periodically, or on System triggers. But they don't seem to work for me.
5) The service should run even if the App is closed, suspended.
6) Windows Runtime Component(Tried using it) is fine but it's not what I want.
Any pointers ?
UPDATE: Consider that I open the weather App, it registers a background task which updates the weather periodically. But what I want is there is no actual App(Which registers my background task). I am an OEM(say ASUS) and I want to flash a Service which starts when the phone is started for the first time and sends me information and it runs even after restart and even after factory reset because it was on the image which I used to flash the device Now Is that possible?
The above example explains my use case more clearly (updated as suggested by Alexej).
Thanks!
Upvotes: 2
Views: 437
Reputation: 2679
In standard WP settings you can find this:
That's app with background tasks. Nothing else. They are start after phone start. But they have limits (just not to slow down phone). There is no other way to do it on phone.
As I have understand you need TimeTrigger. You can run it every hour.
But you can not be 100% sure that it will work. Remember about limitations. Performance is at first.
Upvotes: 1