Coffeehouse Thread

14 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Windows Phone Live Tiles - How do they work?

Back to Forum: Coffeehouse
  • User profile image
    Max Power


    I have been planning to make a small little app for WP7 that shows the battery usage as a live tile.

    After reading some documentation, it would appear that in order to acheive this, I would need to host the tiles image on a URL, and I guess dynamically produce a tile based on the battery levels of the phone.

    So, would this mean in order to make such a simple battery indicator, I would need to burn battery every update to the tile by pulling a paramtised URL from a web server?

    Or am I waaaay of the mark here?

    To me, it makes these sorts of apps totally impractical.

    I thought we would be able to treat the tiles like a user control, and add our own controls to it - ie a label or picturebox, and update directly.






  • User profile image

    The way I understand it is this.  When you run your app it calls to the PNS servers and registers your tile for push, you then send that url to your servers and your app then shuts down,.  Your servers are then responsable for generating updates for the users tiles and sending the updates via microsoft's PNS system which then sends the update to the phone. 

    So your tile does not poll the server, the server pushes tile updates to the phone via the PNS which is meant to be very power efficent.

    In your case this will not work for you as the tile does not 'run' on the phone so can't sample the battery, and there is no background apps to push to the battery status to the server,

    Have a look here from about 1 hour in.

    Your other option is a tile schedule"> that causes the phone to grab a new tile from the server every hour/day/week/month


  • User profile image
    Max Power

    Thanks for your reply, so I guess it is much like I determined - too much trouble, and not going to work in general for an app that is populating the tile with dynamic information sourced on the device itself.

    Bit lame that WP7 cant even have a custom battery indicator though - I got the idea from the dozens of requests for it on the official answers website - now I see why it hasnt been done.

    I wonder how many other little apps like this the update mechanism inhibits.


  • User profile image
    Dr Herbie

    @Max Power: People are requesting a batter power gauge when there's already one there? (Swipe down at the top of the device to see battery power, signal strength, etc).

    Anyway battery gauges aside, I agree that only allowing tile updates from a remote website is somewhat disappointing but given that we don't have background tasks there's not much that you could do to populate the tile with the current, sandboxed application model.



  • User profile image

    What was the design decision that precluded having a local Push Notification System on the phone?

    That is a system where the app doesn't have use a web service, to update its tile. 

    It could be asynchronous. Simply raise an event with the updated tile.

    Combine that with the time coalescing code from Window 7. 

    Imagine having a ticking analogue clock tile.

  • User profile image
    Max Power

    Well, your right anyway Dr Herbie, it was always going to be impossible.

    For some *CRAZY* reason, I thought it might be possible to set up a timer that triggered an event that would run a small snippet of code to update the tile with the latest battery state.

    Yes, I know you can touch the top of the screen to get the battery usage, and you know what, you have to do it every time you use the phone - as the battery life in these things is terrible and must be micromanaged.

    As in, you use it too much, you wont make it home with any juice left from the nights charge.

    And while I myself dont care too much as to whether such an app exists, the fact it CAN'T exist is just crazy and bizzar.

    All they want is to see their battery life on the phone from the home screen without pressing anything - and I am struggling to think of another phone that doesnt offer this basic functionality either built in or with an app.


     *And of course I want to be the one selling it to them Smiley*





  • User profile image

    @Max Power: I think duplicating existing functionality is a bit stupid but don't forget that Windows Phone 7 is still version 1. I'm sure the tile functionality will evolve and that you will be able to run local code to update tiles in the future.

  • User profile image
    Max Power

    For sure, and dont get me wrong, I've loved my WP7 since I got it a couple of weeks ago (hahah.. for ONCE Australia got something before US), just hope they intend to open her up a bit as time goes by.

  • User profile image

    To update a tile without push notifications, check out this MSDN article:">

    Sadly, you cannot run in the background, and honestly, there are very few apps I'd want to run in the background.


  • User profile image

    @Clint: That still requires a connection to a web service, why can't I directly manipulate it? 

  • User profile image

    not so much of a webservice, but the image lives in the internet.

    Finding out more for you.

  • User profile image

    @Clint: Can we possibily update tile w/o push notifications currently? in wp7

    I believe we can do it using wp7.1 using ShellTile APIs.. However I believe we could fake push like mentioned here.. which needs the application to stay on foreground and active.

    Please advise if there is a simple way to achieve updating tile images/count and title w/o push notifications.

    Thank you

  • User profile image

    Also can you please confirm if weather bug and facebook use live tiles w/o push notifications?

    thank you...

  • User profile image

    Tried this one..">

    but I get the error on loading the project for Import project

    Please advise if I need to download the packages from some place...

    Thank you...

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.