RadLiveTileHelper sample/docs

19 posts, 0 answers
  1. Michael
    Michael avatar
    52 posts
    Member since:
    Dec 2005

    Posted 13 Jan 2012 Link to this post

    Where can I find out about the new RadLiveTileHelper class?  I don't see it in the documentation.  In the search on this site, it only brings up a link to the release history (http://www.telerik.com/products/windows-phone/whats-new/release-history/q3-2011-sp1-version-2011-3-1221.aspx).  Thanks!

  2. Todor
    Admin
    Todor avatar
    640 posts
    Member since:
    Sep 2012

    Posted 16 Jan 2012 Link to this post

    Hello Michael,

    Thank you for your question.

    We are still updating our documentation and have not been able to include the LiveTileHelper yet. It will be done soon, but for now, I can explain you the basics.
    The LiveTileHelper is intended to create a tile for an application, which can link to any page inside of it, including but not limiting to the front page. It uses the RadExtendedTileData, which inherits the StandartTileData and adds two additional properties: VisualElement and BackVisualElement. Each of them can be set to any UIElement. LiveTileHelper exposes the following methods: CreateTile, CreateOrUpdateTile and CleanupUnpinnedTilesResources. Here is an example of how to create a tile for the MainPage.xaml of your application:

    RadExtendedTileData extendedData = new RadExtendedTileData();
     
    extendedData.VisualElement = LayoutRoot;
    //this will create a tile looking exactly as your page if it is placed inside a layout panel named LayoutRoot
     
    LiveTileHelper.CreateOrUpdateTile(extendedData, new Uri("/MainPage.xaml", UriKind.RelativeOrAbsolute));


    The difference between the CreateTile and CreateOrUpdateTile methods is that the CreateOrUpdateTile first searches for existing tiles with the same uri and if such tile exist it is deleted before the new one is created. Each time one of these methods is called with two parameters a cleanup is performed to delete the resources for tiles that have been unpinned. If this is not the desired behavior, the methods can be called with their overloads with three parameters, the first two of them being the same and the third - skipCleanup. If the last one is set to true, the cleanup will not be performed until the method CleanupUnpinnedTilesResources is called.

    I hope this information will help you. If you need additional assistance here, let us know.

    Regards,
    Todor
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. Michael
    Michael avatar
    52 posts
    Member since:
    Dec 2005

    Posted 16 Jan 2012 Link to this post

    Yes, I look forward to trying it out.  Thank you for your response!

  4. Geir-Tore
    Geir-Tore avatar
    20 posts
    Member since:
    Jun 2009

    Posted 31 Jan 2012 Link to this post

    What if I only want to update the primary tile for my app (not creating any secondary tiles).

    I want to add some data to the back of my primary tile and would expect this to work:

    var appTile = ShellTile.ActiveTiles.FirstOrDefault();
    if (appTile == null) return; //Don't create...just update
     
    LiveTileHelper.CreateOrUpdateTile(new RadExtendedTileData
    {
        BackVisualElement = new MyTileView(new MyTileViewModel())
    }, appTile.NavigationUri);

    But if fails when using this navigation uri:

    COMException was unhandled: 0x81030112

    Any tip for this scenario?

  5. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2188 posts
    Member since:
    Sep 2012

    Posted 31 Jan 2012 Link to this post

    Hi there,

    this is an issue in the LiveTileHelper. It is fixed now and the fix will be available with the next release of the controls (this week we are releasing a Beta version of Q1.2012).

    Regards, Valentin.Stoychev
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  6. GJ Kuz
    GJ Kuz avatar
    29 posts
    Member since:
    May 2011

    Posted 05 Feb 2012 Link to this post

    Hi,

    Could you please let me know the namespance RadExtendedTileData falls under? I can't seem to resolve it. I have version 11.3.1221.0 of the controls installed.

    thanks,
    Gilles

  7. GJ Kuz
    GJ Kuz avatar
    29 posts
    Member since:
    May 2011

    Posted 05 Feb 2012 Link to this post

    Never mind. I was still referencing the old version of the DLLs in my project.

    Guys, Seriously this is awesome. :) Thanks so much.

  8. GJ Kuz
    GJ Kuz avatar
    29 posts
    Member since:
    May 2011

    Posted 06 Feb 2012 Link to this post

    Dear Telerik Team,

    I was playing around with the LiveTileHelper. Is there a way to update the Livetile without exiting the application? Using the WP7 implementation of the LiveTile class, I could update the Secondary Tile without exiting the app using the Update method. I am updating the BackTile when the user performs certain action and it is not ideal to exit the application. Any way around this? Also noticed that the

     

    BackgroundImage won't allow a Relative Uri.

    thanks,
    Gilles

  9. Todor
    Admin
    Todor avatar
    640 posts
    Member since:
    Sep 2012

    Posted 07 Feb 2012 Link to this post

    Hi Gilles,

    With our latest release Q1 2012 Beta, LiveTileHelper already provides a method UpdateTile, which updates the tile without exiting the application. The CreateOrUpdateTile method is also changed so it exits the application only if you are creating a new tile and not when you update an existing one.

    Thank you for your time.

    Kind regards,
    Todor
    the Telerik team

    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>

  10. Geir-Tore
    Geir-Tore avatar
    20 posts
    Member since:
    Jun 2009

    Posted 07 Feb 2012 Link to this post

    Tried the beta now.

    When I try to set a BackVisualElement with LiveTileHelper.UpdateTile(..) the backside of the tile goes completely dark/blank. Known issue?

  11. Geir-Tore
    Geir-Tore avatar
    20 posts
    Member since:
    Jun 2009

    Posted 09 Feb 2012 Link to this post

    I ran the Marketplace tests now and suddenly realized that the LiveTileHelper uses API which is not allowed in a background service. I want to update the tile in the background and not only from inside the app. Does this mean LiveTileHelper is a no go?

  12. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2188 posts
    Member since:
    Sep 2012

    Posted 09 Feb 2012 Link to this post

    Hi,

    Yes you can't use the LiveTileHelper in Background agent. What is your scenario and why you want to use the LiveTileHelper in your background agent? It won't help you because you don't have any UI there e.g. you can't create a custom image from UIElement in this case. Please let us know - maybe we are missing a major use case here.



    All the best, Valentin.Stoychev
    the Telerik team

    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>

  13. Geir-Tore
    Geir-Tore avatar
    20 posts
    Member since:
    Jun 2009

    Posted 09 Feb 2012 Link to this post

    My App downloads data which consists of a list of items once per day. I would like to update the back of the tile with information about a random item so that it will loop through items during the day and show different back tiles.

    I have been using the solution explained in this StackOverflow post:
    http://stackoverflow.com/questions/7411760/windows-phone-7-1-can-i-change-font-size-on-a-shell-tile

    My problem with this solution is that the layout won't come out exactly as I want (the textblocks won't trigger ellipsis if it overflows the tile size), which is why I started testing the LiveTileHelper.

  14. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2188 posts
    Member since:
    Sep 2012

    Posted 09 Feb 2012 Link to this post

    Hello,

    Unfortunalte as you saw it is not possible to access certain framework features in the background agent. This is a platform limitation currently which we can't escape from.

    In your case you can pre-generate the images for the background tile in the isolated storage and in the background agent to just pick the already generated image. This is fairly simple solution and will work in your case.

    All the best, Valentin.Stoychev
    the Telerik team

    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>

  15. Geir-Tore
    Geir-Tore avatar
    20 posts
    Member since:
    Jun 2009

    Posted 10 Feb 2012 Link to this post

    I ended up fixing my issues with my previous solution to this so it worked out for me :)

  16. Olu
    Olu avatar
    10 posts
    Member since:
    Dec 2010

    Posted 01 May 2012 Link to this post

    Hi,

    You just confirmed LiveTileHelper cannot be used in background agent but this link in the documentation is showing how to use in background agent - http://www.telerik.com/help/windows-phone/livetilehelper-features-autoupdate.html

    It has failed for me in Marketplace test kit, can you confirm if this is not possible to use in background agent? If not, how then to update any tile created with the RadExtendedTileData without the application running?

    Thanks.

  17. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2188 posts
    Member since:
    Sep 2012

    Posted 02 May 2012 Link to this post

    Hello MIchael,

    I confirm this is an issue and we will remove the help article. Thank you for pointing this out!

    We will do our best to fix this for our next official release (mid-June,2012). If you can't to wait until then -  we can give you an internal hotfix earlier - but please send us a support ticket if you want this internal build.

    Kind regards, Valentin.Stoychev
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  18. Michael
    Michael avatar
    1 posts
    Member since:
    Oct 2010

    Posted 23 Jul 2012 Link to this post

    Is this problem fixed? We just wanted to upload our weather app, where we use the LiveTileHelper to update the weather data with an background agent. But get the error messages, that the Telerik core dll uses features that are not allowed...
    Can we get the internal hotfix? We realy need to release this app...

    Best regards,
    Michael

  19. Todor
    Admin
    Todor avatar
    640 posts
    Member since:
    Sep 2012

    Posted 23 Jul 2012 Link to this post

    Hi Michael,

    Since Q2 2012 our releases include a new assembly: BackgroundAgentTools. It includes the LiveTileHelper, but not the features from Core which cause issues in a BackgroundAgent. The idea is to create the tile with LiveTileHelper in your application using the Core assembly and update this tile in the BackgroundAgent by using the LiveTileHelper from the new assembly. You can read more details in this blog post and you can also download a sample application at the end of the post.

    All the best,
    Todor
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top