Detect If App's Live Tile Is Installed On Windows Phone
- Estimated read time: 2 min read
- Written by Chad Campbell on Jun 21st 2013
Windows Phone allows your app to be pinned to the Start screen. When pinned, your app is personified as a Live Tile. Sometimes, you may need to programmatically detect if a user has pinned your app to the Start screen. Thankfully, the Windows Phone API allows you to programmatically see if your app's live tile is pinned.
Programmatically Checking For Your App's Live Tile
The Windows Phone API exposes a class called
ShellTile class empowers you to ping an application's tiles. You can do this by querying the statically visible property named
ActiveTiles as shown here:
You may be wondering why
ShellTile.ActiveTiles is a list instead of an single instance. The reason why is because an app can be pinned multiple times. This gives your users the flexibility to pin your app multiple times. For instance, if your app displays sports scores, a user could pin an instance of your app for each team's score they want to appear on the start screen.