1. Go To File > New > Project 2. Select Javascript >Windows > Windows Universal > Select Blank App (Windows Universal) > Change the Name of the project 3. Go To Package.appmanifest > Change the default.html to the URL that you need to port the web to an app. 4. Add the Content Rules <uap:ApplicationContentUriRules> <uap:Rule Match="http://gameofbombs.com/landing"/> </uap:ApplicationContentUriRules> 5. Delete the unnecessary file at the Solution File Step 3- Step 5 as shown below. 6. Press F5, to run the project.
Congrats, Your First Universal Windows Platform success created. After Installation of Visual Studio 2015 RC, Error was display as shown below. How to Solve?
Go To https://dev.windows.com/en-us/downloads/windows-10-developer-tools , Scroll until the end. You need to download the Windows 10 SDK. Please Download and Install. but at First you need to install latest Windows 10 This is a small sample application showcasing the interaction with a Microsoft Band from a WinRT-based app. It shows how to get Bands paired with the current system, how to iterate over them, and how to control them - including reading the various sensors and sending simple commands (like vibration). This sample requires the Microsoft Bank Preview SDK.
All the code you care about is probably in the MainPage.cs. Microsoft Band SDK Preview The Microsoft Band SDK Preview gives developers access to the sensors available on the band, as well as the ability to create and send notifications to tiles. Enhance and extend the experience of your applications to your customers' wrists. Amazing App Experiences Extend the experience of your application to your users' wrists via a new dimension of interaction. Create an app that can send UI content to the band, keeping users engaged when they're in motion. Your app can also receive data directly from the band sensors, giving your users more reasons to interact with it. Create a personalized, data-rich, custom experience and enhanced scenarios that will engage users in ways only possible with Microsoft Band. Access Sensors Use a range of sensors including heart rate, UV, accelerometer, gyroscope, and skin temperature, as well as fitness data, to design cutting-edge user experiences:
Create App Tiles Keep users engaged and extend your app experience to Microsoft Band. Create tiles for the band that send glanceable notifications from your app to your users. Each app tile is visually represented on the Start Strip by an icon, and when a new notification arrives, the icon is scaled down and a number badge appears on the tile. App notifications come in two flavors:
Personalize Device Monetize your app by offering users ways to customize the band. Change the color theme, or bring the Me Tile to life by changing the wallpaper. SDK API Usage More advanced documentation can be found on the Microsoft Band Developers Page. Requirements Android 4.2+
Windows Phone 8.1+ & Windows 8.1+ (Windows Runtime)
iOS 7+
Connecting to a Band Android var pairedBands = BandClientManager.Instance.GetPairedBands(); var bandClient = BandClientManager.Instance.Create(this, pairedBands[0]); await bandClient.ConnectTaskAsync(); Windows var pairedBands = await BandClientManager.Instance.GetBandsAsync(); var bandClient = await BandClientManager.Instance.ConnectAsync(pairedBands[0]); iOS var manager = BandClientManager.SharedManager; var client = manager.AttachedClients.FirstOrDefault (); if (client == null) { // error: No Bands attached. } else { manager.Connect(client); } Connecting the a Sensor Android // get the sensor var accelerometer = bandClient.SensorManager.CreateAccelerometerSensor(); // add a handler accelerometer.ReadingChanged += (o, args) => { var yReading = args.SensorReading.AccelerationY; }; // start reading, with the interval await accelerometer.StartReadingsTaskAsync(SampleRate.Ms16); // stop reading await accelerometer.StopReadingsTaskAsync(); Windows // get the sensor var accelerometer = bandclient.SensorManager.Accelerometer; // set the interval accelerometer.ReportingInterval = TimeSpan.FromMilliseconds(16); // add a handler accelerometer.ReadingChanged += (o, args) => { var yReading = args.SensorReading.AccelerationY; }; // start reading await accelerometer.StartReadingsAsync(); // stop reading await accelerometer.StopReadingsAsync(); iOS // start listening to the sensor with a callback NSError queueError; client.SensorManager.StartAccelerometerUpdates(null, out queueError, (data, error) => { var yReading = data.Y; }); Working with Tiles Android // get the tiles var tiles = await bandClient.TileManager.GetTilesTaskAsync(); // the the number of tiles we can add var capacity = await bandClient.TileManager.GetRemainingTileCapacityTaskAsync(); // create a new tile var tile = new BandTile.Builder(tileUuid, "TileName", tileIcon) .SetTileSmallIcon(smallIcon) .Build(); // add the tile await bandClient.TileManager.AddTileTaskAsync(this, tile); // remove the tile await bandClient.TileManager.RemoveTileTaskAsync(tile); Windows // get the tiles var tiles = await bandClient.TileManager.GetTilesAsync(); // the the number of tiles we can add var capacity = await bandClient.TileManager.GetRemainingTileCapacityAsync(); // create a new tile var tile = new BandTile(tileGuid) { IsBadgingEnabled = true, Name = "TileName", SmallIcon = smallIcon, TileIcon = tileIcon }; // add the tile await bandClient.TileManager.AddTileAsync(tile); // remove the tile await bandClient.TileManager.RemoveTileAsync(tile); iOS // get the tiles client.TileManager.GetTiles ((tiles, tileError) => { // tiles contains the collection of app tiles }); client.TileManager.RemainingTileCapacity((capacity, error) => { // capacity contains the value of the remaining spaces }); // create the tile NSError operationError; var tile = BandTile.Create( new NSUuid ("DCBABA9F-12FD-47A5-83A9-E7270A4399BB", "B tile", BandIcon.FromUIImage (UIImage.FromBundle ("B.png"), out operationError), BandIcon.FromUIImage (UIImage.FromBundle ("Bb.png"), out operationError), out operationError); // add the tile client.TileManager.AddTile(tile, error => { }); // remove the tile client.TileManager.RemoveTile (tileId, error => { }); Send a Message Android await bandClient.NotificationManager.SendMessageTaskAsync( tileGuid, "Message title", "Message body", DateTime.Now, MessageFlags.ShowDialog); Windows await bandClient.NotificationManager.SendMessageAsync( tileGuid, "Message title", "Message body", DateTimeOffset.Now, MessageFlags.ShowDialog); iOS client.NotificationManager.SendMessage( tileId, "Message title", "Message body", NSDate.Now, BandNotificationMessageFlags.ShowDialog, error => { }); |
Archives
June 2020
Categories
All
|