locked
How do I schedule TileUpdate notifications when on battery?

    Question

  • I can schedule Tile updates using the TileUpdateManager to get a TileUpdater and calling AddToSchedule. No problems doing that via the App when its running, or via a backgroundtask (MaintenanceTask) when the device is powered.

    I can schedule up to 4096 updates. My app updates the tile once per minute and the information is valid for one minute. If the user turns off their device for three days and then turns it on in battery mode, then MaintenceTasks will not run. All other tasks such as Timer task requires the app to be pinned to the lockscreen.

    MaintenanceTasks will not run in battery mode. So my app will not be able to schedule further updates to the tile until they plug in the power, at which point the task runs and schedules my updates.

    So how do I run a background task when the device is on battery? Seems to be a hole not covered by tasks. I would have liked MaintenanceTasks to still be runnable but perhaps less frequently? or with lower CPU quotas.

    thanks,

    Stephen

    Sunday, September 16, 2012 10:18 PM

Answers

  • you can not. you have to add your application to the lockscreen.

    the idea is that the user is in control which application drains his battery empty.

    • Marked as answer by Stephen Price Tuesday, September 18, 2012 2:39 AM
    Monday, September 17, 2012 7:05 AM

All replies

  • you can not. you have to add your application to the lockscreen.

    the idea is that the user is in control which application drains his battery empty.

    • Marked as answer by Stephen Price Tuesday, September 18, 2012 2:39 AM
    Monday, September 17, 2012 7:05 AM
  • I suspected that was the answer. 

    I'll use a timer background task and let the user know (somehow?) that it must be pinned to work in battery only. 

    Little disappointing but I understand the logic. 

    Tuesday, September 18, 2012 2:41 AM