Skip to content

Adaptive tile with image not working #33

Open

Description

@IgorX2

I have the following XML code for a live tile (at the time of writing this, the image is available online):

<?xml version="1.0"?><tile><visual><binding template="TileSmall"><image src="http://cdn.interestingengineering.com//wp-content/uploads/2016/11/electriccharger-480x341.jpg" alt="Car Companies Join Forces to Build Charging Network Across Europe" placement="background" hint-crop="none" hint-overlay="20"/></binding><binding template="TileMedium"><image src="http://cdn.interestingengineering.com//wp-content/uploads/2016/11/electriccharger-480x341.jpg" alt="Car Companies Join Forces to Build Charging Network Across Europe" placement="background" hint-crop="none" hint-overlay="20"/><text hint-align="left" hint-style="caption" hint-wrap="true">Car Companies Join Forces to Build Charging Network Across Europe</text></binding><binding template="TileWide"><image src="http://cdn.interestingengineering.com//wp-content/uploads/2016/11/electriccharger-480x341.jpg" alt="Car Companies Join Forces to Build Charging Network Across Europe" placement="background" hint-crop="none" hint-overlay="20"/><text hint-align="left" hint-style="caption" hint-wrap="true">Car Companies Join Forces to Build Charging Network Across Europe</text></binding><binding template="TileLarge"><image src="http://cdn.interestingengineering.com//wp-content/uploads/2016/11/electriccharger-480x341.jpg" alt="Car Companies Join Forces to Build Charging Network Across Europe" placement="background" hint-crop="none" hint-overlay="20"/><text hint-style="body" hint-wrap="true">Car Companies Join Forces to Build Charging Network Across Europe</text><text hint-align="left" hint-style="caption" hint-wrap="true">Several motor companies are teaming up to provide more efficient electric vehicle charging stations throughout Europe.

Participating car companies include BMW, Ford Motor Company, Daimler AG, and Volkswagen Group with Audi and Porsche. The groups made a joint announcement earlier this week. The companies hope that this serves as a milestone in “facilitating mass-market battery electric vehicle adoption,” the press release said.

[Image courtesy of Pixabay]

The network of charging stations would initial...</text></binding></visual></tile>

The code was tested with the Notification Visualizer app and displays in a correct fashion. However, when sent to the tile, the tile fails to display. If the XML code is kept the same, and only the image removed, the notification is displayed. I am using a queue on the tile, and only those notifications without an image work.

Activity

  1. andrewleader commented on Nov 30, 2016

    @andrewleader
    Member

    Hey Igor, remote http images need to be no larger than 200 KB to be displayed on a live tile or in a toast notification. Looks like that image exceeds the limit.

    Your options are to either download the image locally and reference it via ms-appdata, or use a http image that is a smaller size.

    In the future we hope to add this warning to the Visualizer.

    Thanks!
    Andrew

  2. IgorX2 commented on Nov 30, 2016

    @IgorX2
    Author

    @Anbare The image is less than 40KB in size. I just checked to make sure. I do not believe that file size is the cause of the problem.

  3. andrewleader commented on Nov 30, 2016

    @andrewleader
    Member

    Odd, it seems to work for me, I pinned the tile to Start using Visualizer and it appeared (note that it takes a few seconds for the image to download and the notification to appear, but it appeared).

    image

    Does it not appear for you when you pin it via Visualizer? Or it only doesn't appear when you pin it within your app?

  4. IgorX2 commented on Nov 30, 2016

    @IgorX2
    Author

    It doesn't work when I pin it through Visualizer. I just get the blank icon.

    In my app, I get the app's logo. The badge on the same tile works well, however.

    I've noticed similar behavior on my Surface tablet, so it doesn't seem to be an isolated issue for a single machine.

  5. andrewleader commented on Dec 1, 2016

    @andrewleader
    Member

    Really odd... could you try putting the image in a toast and popping that from the Visualizer? Here's the XML for that. Let me know if the toast works.

    <toast launch="action=viewPhoto&amp;photoId=92187">
    
      <visual>
    	<binding template="ToastGeneric">
    	  <text>Adam Wilson tagged you in a photo</text>
    	  <text>On top of McClellan Butte - with Andrew Bares</text>
    	  <image src="http://cdn.interestingengineering.com//wp-content/uploads/2016/11/electriccharger-480x341.jpg"/>
    	</binding>
      </visual>
    
    </toast>
    
  6. IgorX2 commented on Dec 2, 2016

    @IgorX2
    Author

    Toast works.

    I've also played around with the tile. As long as I remove the image, it works. If I remove the image only from, for example, the large tile, only the large tile will work and tiles with other sizes will display the logo.

  7. andrewleader commented on Dec 2, 2016

    @andrewleader
    Member

    Thank you for confirming that toast works! I've noticed that after pinning the tile and opening Start, if you close and re-open Start, the image successfully appears.

    Our devs are investigating this issue and we'll hopefully have a fix for the next version of Windows 10. In the meantime, I would recommend either shipping your app without the remote image, downloading the image to app data, or simply include the remote image and it seems like it should appear the second time Start is opened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions