×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Mar 2007
    Location
    ..., Earth, Brazil, Paraiba, Campina Grande
    Posts
    72

    Question Problem with IconicTileData

    Hi guys,

    I'm trying to use the IconicTileData to show a counter and an icon on the live tile, but it shows only the counter (not the icon). My code is shown below; I've tried a very simple example and the images are in the right sizes( 70x110 ) and (132x220).

    Notice that I'm trying to update the application default tile. I'm doing this because i want to create a lock screen notification too.

    Code:
    //Update app default tile.
                    IEnumerator<ShellTile> enumeratorShellTiles = ShellTile.ActiveTiles.GetEnumerator();
                    if (enumeratorShellTiles.MoveNext())
                    {
                        ShellTile firstTile = enumeratorShellTiles.Current;
                        IconicTileData tileData = new IconicTileData()
                        {
                            Title = "Map alarm",
                            Count = returnedAlarms.Count,
                            SmallIconImage = new Uri("/Assets/Tile/SmallIconImage.png", UriKind.Relative),
                            IconImage = new Uri("/Assets/Tile/IconImage.png", UriKind.Relative)
                        };
                        firstTile.Update(tileData);
                    }
    There not so much documentation about tiles in Windows Phone api and I even don't know if I'm using it correctly. I've tested on a Lumia 820 and the above code is called from a ScheduledTaskAgent instance.

    Anyone could help me? Thanks!

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2013
    Location
    Dublin, Ireland
    Posts
    548

    Re: Problem with IconicTileData

    There's a good set of examples on the Nokia wiki with a demo project attached at the bottom of the page...

    http://www.developer.nokia.com/Commu...indows_Phone_8

  3. #3
    Registered User
    Join Date
    Jan 2013
    Location
    Timisoara, Romania
    Posts
    14

    Re: Problem with IconicTileData

    Hi,

    First of all, look at the properties of the images, at Build Action. It should work both Content and Resource, but try with Content. And I hope that the image is located in the ScheduledTaskAgent, not in the main project. The code look fine to me, and if you said that the counter is working well, it's a problem with the pictures.

    If you checked that and didn't work, let me know

  4. #4
    Registered User
    Join Date
    Mar 2007
    Location
    ..., Earth, Brazil, Paraiba, Campina Grande
    Posts
    72

    Re: Problem with IconicTileData

    Hi ADU,

    I didn't try yet, but i guess that you found the problem. My images aren't located in the ScheduredTaskAgent, they are in the main project. I'll test as soon as possible and let you know the result.

    Thanks!

  5. #5
    Nokia Developer Moderator
    Join Date
    Feb 2011
    Location
    Portugal
    Posts
    946

    Re: Problem with IconicTileData

    Quote Originally Posted by mfabiop View Post
    Hi ADU,

    I didn't try yet, but i guess that you found the problem. My images aren't located in the ScheduredTaskAgent, they are in the main project. I'll test as soon as possible and let you know the result.

    Thanks!
    Do let us know how that worked out for you

  6. #6
    Registered User
    Join Date
    Mar 2007
    Location
    ..., Earth, Brazil, Paraiba, Campina Grande
    Posts
    72

    Re: Problem with IconicTileData

    Hi,

    This didn't work .


    Sorry for late response. I was not watching this thread and as I have a lot of tasks to do before resolve this icon problem, I've decided to postpone this problem .

    Anyway, it's not working. But i guess that I have to study a little bit more about Live Tiles.

    Regards and thanks! As soon as i find a solution, i'll post here.

  7. #7
    Nokia Developer Champion
    Join Date
    Feb 2013
    Location
    Dublin, Ireland
    Posts
    548

    Re: Problem with IconicTileData

    What exactly is not working? does the tile update at all? is it missing text or images?

    Also, are you using ScheduledActionService.LaunchForTest (otherwise you'll have to wait 30+ mins for the first tile update) ?

  8. #8
    Registered User
    Join Date
    Mar 2007
    Location
    ..., Earth, Brazil, Paraiba, Campina Grande
    Posts
    72

    Re: Problem with IconicTileData

    Hi,

    It's updating, but if the counter is greater than 0, it's missing the image. If the counter is 0, it's showing only the image.

    I'm using the LaunchForTest.

  9. #9
    Nokia Developer Champion
    Join Date
    Feb 2013
    Location
    Dublin, Ireland
    Posts
    548

    Re: Problem with IconicTileData

    Quote Originally Posted by mfabiop View Post
    It's updating, but if the counter is greater than 0, it's missing the image. If the counter is 0, it's showing only the image.
    Just to rule out a few things, have you tried the following...

    1. Use different small + medium sized images and see if they display
    2. Where you specify the counter, use a Random number instead
    3. Try setting some "WideContent" on the tile

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×