Answered by:
Default Tile for BackgroundTaskSample not showing up

-
I am trying to send a notification to my the default tile of this sample app in the CompleteHandler but I dont see a Tile showing up on the Metro UI. I am running the BackgroundTaskSample demo app.
Any ideas? Thanks
var tileXml = Notifications.TileUpdateManager.getTemplateContent(Notifications.TileTemplateType.tileWideText03); // You will need to look at the template documentation to know how many text fields a particular template has // You can also use the Advanced Tile SDK Sample to preview all of the templates // get the text attributes for this template and fill them in var tileAttributes = tileXml.getElementsByTagName("text"); tileAttributes[0].appendChild(tileXml.createTextNode("Sending Complete Notification!!")); // create the notification from the XML var tileNotification = new Notifications.TileNotification(tileXml); // send the notification to the app's default tile Notifications.TileUpdateManager.createTileUpdaterForApplication().update(tileNotification);
Friday, November 11, 2011 7:46 PM
Question
Answers
-
OK so here's the fundamental thing I should hava tried earlier! I had to Restart my VM running Win8 Dev Preview and all tiles are now showing up!
Thanks for your help!!
- Proposed as answer by Jeff SandersMicrosoft employee, Moderator Monday, November 14, 2011 7:50 PM
- Marked as answer by optimus_p Wednesday, November 16, 2011 7:19 PM
Monday, November 14, 2011 7:49 PM
All replies
-
You don't see the tile to launch the app? It is possible the tile got un-pinned. Hit the Windows key (button or icon) and type the name of the app, then right click on it or swipe it to select and select pin.
-Jeff
Jeff Sanders (MSFT)Friday, November 11, 2011 8:36 PMModerator -
Ive already tried looking for it/searching within the "Search Apps" TextField - its just now showing up there!Friday, November 11, 2011 8:45 PM
-
Try just typing a letter B and look through the list.
Jeff Sanders (MSFT)Friday, November 11, 2011 8:55 PMModerator -
When I type 'B', I see 5 tiles for apps starting with B including the 'Basic Tiles Sample' that I compiled and ran from Visual Studio Express 11 but I dont see this one in that list for some reason
Friday, November 11, 2011 9:20 PM -
That is really strange Opti... To move forward, you can change the manifest and use a different name. That should install into a different location as if this was a new application. Change the name attribute in the Identity tag and the DisplayName attribute in the VisualElements tag to get a new icon in the Start menu.
Jeff Sanders (MSFT)Monday, November 14, 2011 1:28 PMModerator -
I opened up package.appxmanifest which is in the top-level folder inside BackgroundTaskSample - I see that there are 4 tabs - Application UI (There's a Display Name field in there that I changed, assuming that this is the DisplayName attribuite), Capabilities, Declarations, Content URIs and Packaging. The Packaging tab has t fields, Package Name and Package Display Name but I dont see anything that says "Name", nor do I see an Identity Tag or a VisualElements tag...am I looking at the right place?
Thanks!
Monday, November 14, 2011 7:04 PM -
Sorry Opti...
Right click on the manifest and open it with the text editor.
-Jeff
Jeff Sanders (MSFT)Monday, November 14, 2011 7:06 PMModerator -
Modified the package.appxmanifest as follows...rebuilt solution and Ran it...Still dont see a Tile Showing up on the Start Page or if I search for Apps
..
<Identity Name="BackgroundTask.BackgroundTaskSampleDemo" Version="1.0.0.0" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" />
<Properties>
<DisplayName>BackgroundTask.BackgroundTaskSampleDemo</DisplayName>
<PublisherDisplayName>Microsoft Corporation</PublisherDisplayName>
<Description>BackgroundTask SDK Sample</Description>
<Logo>images\storeLogo-sdk.png</Logo>
</Properties>
<Resources>
<Resource Language="en-us" />
</Resources>
<Prerequisites>
<OSMinVersion>6.2</OSMinVersion>
<OSMaxVersionTested>6.2</OSMaxVersionTested>
</Prerequisites>
<Applications>
<Application Id="FeatureName" StartPage="default.html">
<VisualElements DisplayName="BackgroundTaskSampleDemo" Logo="images\squareTile-sdk.png" SmallLogo="images\smallTile-sdk.png" Description="Background Task Sample" ForegroundText="dark" BackgroundColor="#FFFFFF" InitialRotationPreference="landscape">Monday, November 14, 2011 7:27 PM -
Try this and if that does not work, just create a new application for now:
<Identity Name="JeffBackgroundTask.BackgroundTaskSample" Version="1.0.0.0" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" />
<Properties>
<DisplayName>jeffBackgroundTask.BackgroundTaskSample</DisplayName>
<PublisherDisplayName>Microsoft Corporation</PublisherDisplayName>
<Description>BackgroundTask SDK Sample</Description>
<Logo>images\storeLogo-sdk.png</Logo>
</Properties>
<Resources>
<Resource Language="en-us" />
</Resources>
<Prerequisites>
<OSMinVersion>6.2</OSMinVersion>
<OSMaxVersionTested>6.2</OSMaxVersionTested>
</Prerequisites>
<Applications>
<Application Id="FeatureName" StartPage="default.html">
<VisualElements DisplayName="JeffBackgroundTaskSample" Logo="images\squareTile-sdk.png" SmallLogo="images\smallTile-sdk.png" Description="Background Task Sample" ForegroundText="dark" BackgroundColor="#FFFFFF" ToastCapable="true" InitialRotationPreference="portrait">
<LockScreen Notification="badgeAndTileText" BadgeLogo="images\badgelogo.png" />
Jeff Sanders (MSFT)Monday, November 14, 2011 7:34 PMModerator -
OK so here's the fundamental thing I should hava tried earlier! I had to Restart my VM running Win8 Dev Preview and all tiles are now showing up!
Thanks for your help!!
- Proposed as answer by Jeff SandersMicrosoft employee, Moderator Monday, November 14, 2011 7:50 PM
- Marked as answer by optimus_p Wednesday, November 16, 2011 7:19 PM
Monday, November 14, 2011 7:49 PM -
Oh goodness! Sorry I did not think of having you try that. Previews are a bit preview (is that a word?)!
Jeff Sanders (MSFT)Monday, November 14, 2011 7:50 PMModerator -
lol - Previews are a bit "preview" (is that a word?)! perhaps the quotes qualifies it:) Now Im going to go back to my original problem of trying to send a notification to the Tile from the BackgroundTaskSample code!Monday, November 14, 2011 7:54 PM