BandIOException when adding custom page layout to Microsoft Band panel (save binaries only)

I am building a Microsoft Band app that uses new custom page layouts. I am using Microsoft Visual Studio Community 2013 Update 4. Everything works fine for me and the application works fine in my test environment (i.e. when I push the application from my computer to my phone). However, as soon as I create a store build and build a beta app package and download it from the store and try to install the Band tile through the app, I get an exception. I repeat, I don't get an exception when I install the Band tile via the app, when the app is pushed out of my dev environment, but I do when the same code is used to create the app package and the process repeats, but with a newly downloaded binary.

The Band tile has been successfully added to my group, but my group app only has the first of 5 custom page layouts I'm trying to add. I know this after much trial and error (dozens of beta app packages are uploaded to the App Store).

I asked other beta testers and they all get the same exception.

Here is the details of the exception

Microsoft.Band.BandIOException:
Exception of type 'System.Resources.MissingManifestResourceException' was thrown. ---> System.Resources.MissingManifestResourceException: 
Exception of type 'System.Resources.MissingManifestResourceException' was thrown.
at
System.Resources.ResourceManager.GetString(String name, CultureInfo culture)
at
Microsoft.Band.BandResources.get_CommandStatusError()
at
Microsoft.Band.BandClient.CheckStatus(CargoStatus status, CommandStatusHandling statusHandling)
at
Microsoft.Band.BandClient.DynamicPageLayoutSetLayout(Guid appId, UInt32 layoutIndex, PageLayout layout)
--- End of inner exception stack trace ---
at
Microsoft.Band.BandClient.DynamicPageLayoutSetLayout(Guid appId, UInt32 layoutIndex, PageLayout layout)
at
Microsoft.Band.BandClient.AddTileOutsideSync(BandTile tile)
at
Microsoft.Band.BandClient.<>c__DisplayClass9b.<AddTile>b__9a()
at
Microsoft.Band.BandClient.RunUsingSynchronizedFirmwareUI(Action insideSync, Action afterSync)
at
Microsoft.Band.BandClient.AddTile(BandTile tile, Guid applicationId, IReadOnlyList`1 installedTiles)
at
Microsoft.Band.BandClient.<>c__DisplayClass6f.<<AddTileAsync>b_6c>d__71.MoveNext()
-- End of stack tracke from previous location where exception was thrown ---

      

After a lot of trial and error, I have simplified the problem to the following code. It throws an error when the binary is checked out from the App Store and this method is executed. However, this does not result in errors when the binary is uploaded from my local machine via Microsoft Visual Studio 2013 and this method is executed. Also, if I remove the line that adds the custom page layout and submits my app through store and validation, no exceptions are thrown.

public async Task CreateBandTile() {
        try
        {
            Guid tileId = new Guid("2D3A78E2-84BB-4E56-AFEB-B160B2433E20");
            IBandInfo[] pairedBands = await BandClientManager.Instance.GetBandsAsync();
            IBandClient bandClient = await BandClientManager.Instance.ConnectAsync(pairedBands[0]);

            BandTile myTile = new BandTile(tileId)
            {
                Name = "My Band Tile",
                TileIcon = await LoadIcon("ms-appx:///Assets/IconLarge.png"),
                SmallIcon = await LoadIcon("ms-appx:///Assets/IconSmall.png"),
                IsBadgingEnabled = false
            };

            FlowPanel page = new FlowPanel(
                new TextBlock()
                {
                    ElementId = 1,
                    Rect = new PageRect(0, 0, 100, 30),
                    Font = TextBlockFont.Small
                }
            )
            {
                Rect = new PageRect(0, 0, 245, 30)
            };

            // *** If I remove the following line, no exception is thrown ***
            myTile.PageLayouts.Add(new PageLayout(page));

            // Remove the Tile from the Band, if present. 
            await bandClient.TileManager.RemoveTileAsync(tileId);

            // Create the Tile on the Band.
            await bandClient.TileManager.AddTileAsync(myTile);
        }
        catch (Exception)
        {
            throw;
        }
}

      

What am I doing wrong here? I may be the first developer to submit an app via MS App Store that uses native layouts. I feel like there is a bug here that ends with Microsoft.

+3


source to share


1 answer


The bug was resolved with the release of the new Microsoft Band SDK.



0


source







All Articles