4

I'm sending a tile update to my app users. After the tile update I would like to automatically direct the user to the new updated page once he clicks the new tile. Is there any way I can achieve this?

I can't pull the server anymore because it's a fire & forget mechanism.

With toast notifications I can use the following message in my notification:

<wp:Param>/Views/MyPage.xaml</wp:Param>

But that doesn't seem to work with my FlipTile update.

Kevin Cloet
  • 2,956
  • 1
  • 19
  • 36
  • 1
    That's an interesting question. Still, you have no guarantee of delivery when using notifications. Therefore, is it really safe for your app to rely on a "fire & forget mechanism", even if you're able to solve the tile issue? – Kevin Gosse May 29 '13 at 11:45
  • That's a risk I have to take I suppose. The app isn't for consumers but more a private app in house. I'd rather be fixing this problem than worrying about the 1% change of a failed push notification :) – Kevin Cloet May 29 '13 at 11:48

1 Answers1

0

Im not quite sure if this is what you are looking for, but can you just replace the Tile once the app is loaded? Somewhat like this:

/// <summary>
/// Creates or replaces a tile with a Title and a parameter
/// </summary>
public void replaceTile()
{
//ShellTile TileToFind = ShellTile.ActiveTiles.First();

string tileTitle = "Title of the Tile";


//You might want to use your Parameter from the toast here as the PageName
ShellTile TileToFind = FindTile( "/PageName.xaml?parameter" );

StandardTileData NewTileData = new StandardTileData
{
    Title = tileTitle,
    BackgroundImage = new Uri( "/Resources/tile_icon.png", UriKind.Relative ),
    Count = 0,
    BackTitle = "",
    //BackBackgroundImage = new Uri("/Resources/appicon_large.png", UriKind.Relative),
    BackBackgroundImage = new Uri( "", UriKind.Relative ),
    BackContent = ""
};

// Application should always be found, since it is always the first tile (even if not on homescreen)
if ( TileToFind == null )
{


    // Update the Application Tile with the NewTileData
    //TileToFind.Update( NewTileData );


    //Or replace an existing (second) tile with the new, updated Tile
    //ShellTile alreadyExistingTile = FindTile( "/PageName.xaml?parameter" );

    //if ( alreadyExistingTile != null )
    //{
    //  alreadyExistingTile.Delete();
    //}

    ShellTile.Create( new Uri( "/PageName.xaml?parameter=" + newParameter, UriKind.Relative ), NewTileData );
}
else
{
    TileToFind.Update( NewTileData );
}}
Remi Smirra
  • 2,499
  • 1
  • 14
  • 15
  • Nope that's not what I'm looking for. I need to change the NavigationUri via a tile push notification. So even when the app is not running the NavigationUri can be changed. – Kevin Cloet May 29 '13 at 16:56