Using connected devices in Metro style apps

Slides:



Advertisements
Similar presentations
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Advertisements

© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Preface Demo A Quick Thank You How Did We Do It?
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
© 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
MIX 09 4/15/ :14 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
demo Default WANGPSLookup Default WANGPS.
Multitenant Model Request/Response General Model.
Announcing Demo Announcing.
Feature: Web Client Keyboard Shortcuts © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
Session 1.
Built by Developers for Developers…. © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Print Remaining Documents © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
Connect with life Connect with life
Do more with Windows Live Essentials & Office Web Apps.
demo Receive Inventory Export Parse and Normalize.
FonePlus Hugh Teegan Architect Mobile Devices Microsoft Corporation.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Document Attachment –Replace OLE Notes © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
Feature: Customer Combiner and Modifier © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
Ian Ellison-Taylor General Manager Microsoft Corporation PC27.
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
demo Instance AInstance B Read “7” Write “8”

customer.
demo © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
demo Demo.
demo QueryForeign KeyInstance /sm:body()/x:Order/x:Delivery/y:TrackingId1Z
projekt202 © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks.
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.

DataModel VisualizationExternal Assets Workbook Excel Services API BrowserRich Apps EWA JSOMBrowser REST BrowserRich Apps.
MIX 09 4/17/2018 4:41 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Power your app with Live services
SkyDrive Pro Chris Gideon Architect Microsoft 9/16/2018
Возможности Excel 2010, о которых следует знать
Building great Metro style apps for mobile broadband devices
Integrating with the Windows Device Experience
Making apps social and connected with HTTP services
Title of Presentation 11/22/2018 3:34 PM
Deep dive on app data roaming
Office Mac /30/2018 © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Build /2/ The future of Azure devops: Building and managing cloud applications lifecycle across your teams Bradley Millington Program.
Title of Presentation 12/2/2018 3:48 PM
What is OneDrive vs. OneDrive for Business??
Search: integrating into the Windows 8 search experience
Getting started with Windows Azure
File type associations and AutoPlay
1/3/2019 1:21 PM © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Introducing Metro style device apps
Create experiences that span devices
Create rich, data-driven Web apps with ASP.NET 4.5 Web Forms
8/04/2019 9:13 PM © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Виктор Хаджийски Катедра “Металургия на желязото и металолеене”
Under the hood: Installation and updates for Metro style apps
PENSACOLA ENERGY WORK PLAN OCTOBER 10, 2016
Title of Presentation 5/12/ :53 PM
Шитманов Дархан Қаражанұлы Тарих пәнінің
The complete developer's guide to the SkyDrive API
Title of Presentation 5/24/2019 1:26 PM
5/24/2019 6:44 PM 1/8/18 Bell #10 In a world governed by the gods, is there any room for human will? Do human choices make a difference? EXPLAIN © 2007.
John Hazen Principal Program Manager Lead Microsoft Corporation
Title of Presentation 7/24/2019 8:53 PM
Ask the experts: Device apps
WCL425 App Compat for Nerds Chris Jackson.
5/6/19, Bell #6 12/11/2019 8:26 PM Explain the relationship between this picture and the events that took place in Chapter 7 in Animal Farm. © 2007 Microsoft.
Presentation transcript:

Using connected devices in Metro style apps 12/5/2018 7:48 PM PLAT-278T Using connected devices in Metro style apps Jack Tao Program Manager Lisa Ong Software Developer Microsoft Corporation © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Agenda Creating possibilities for your app with devices Finding a device to use in your Metro style app Using a device in your Metro style app You’ll leave with examples of how to Make your app more exciting by integrating with devices

Your Metro style app can seamlessly integrate device access.

Using devices from your Metro style app Ecosystem of devices carrying a lot of data and content Apps create more possibilities with access to device content Windows APIs enable you to build apps that leverage devices

Creating possibilities for your app with devices

It’s easy for your Metro style app to use a variety of devices.

Using SMS and Location in a Metro style app demo Where’s my lost tablet? Using SMS and Location in a Metro style app

How I found my lost tablet from: 425-mylaptop to: 425-mytablet body: Where is my tablet? my laptop @ //build/ from: 425-mytablet to: 425-mylaptop body: 47.XXXXX, -122.YYYYY my lost tablet @ my office! location ???

Using SMS & Location Through Windows, your app can send & receive SMS using mobile broadband Through Windows, your app can easily integrate Location

Variety of devices

Devices carry a ton of information Music Photos Videos Documents Contacts, calendar, tasks, notes Text messages Location and routes Workout stats Health data

Many common scenarios include devices Uploading vacation photos, movies from camera to SkyDrive Importing contacts from phone Backing up data to external storage Getting trip history from personal navigation device Tracking daily workout from a fitness device Sending and receiving SMS messages with mobile broadband

Your app can easily use device content with cloud services.

Uploading photos from a camera to SkyDrive 12/5/2018 7:48 PM demo Photo uploader Uploading photos from a camera to SkyDrive © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Portable storage & web services Through Windows, your app can easily access content stored on devices Through Windows, your app can share content from devices to an online service

You can create mash-up apps that use devices in new ways.

Visualizing maps from an off-the-shelf GPS 12/5/2018 7:48 PM demo Rally trip Visualizing maps from an off-the-shelf GPS © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Portable storage & mash-ups Your app can combine data from devices & web services to create a mash-up Mash-up apps provide rich and exciting ways to use content from devices

Using devices in your app Ecosystem of devices more More possibilities + Your Metro style app

Finding a device to use in your Metro style app

Ways your app can find devices to use Multiple/externally-connected Use Windows.Devices.Enumeration Perform queries to list devices Get device icon, name, etc. Get connect/disconnect events Single/built-in Get the default device

Find devices by query & enumeration.

Finding all portable storage devices var query = Windows.Devices.Enumeration.DeviceClass.portableStorageDevice; Windows.Devices.Enumeration.DeviceInformation.findAllAsync(query). then(function (storageDevices) { var name = storageDevices[0].name; storageDevices[0].getThumbnailAsync(function (deviceIcon) { var imageTag = document.createElement('img'); imageTag.src = URL.createObjectURL(deviceIcon, …); // PNG format }); var storageDevice = Windows.Devices.Portable.StorageDevice.fromId(storageDevices[0].id);

Find a built-in device with one line of code. Start using it right away.

Use the .getDefault( ) pattern var smsDevice = Windows.Devices.Sms.SmsDevice.getDefault(); // Start sending & receiving SMS … var inclinometer = Windows.Devices.Sensors.Inclinometer.getDefault(); // Start writing your racing game … var proximity = Windows.Networking.Proximity.ProximityDevice.getDefault(); // Start discovering nearby PCs …

Using a device in your Metro style app

Ways your app can use devices Use files stored on the device File APIs for searching and acting on files Send & receive SMS using mobile broadband Access contacts on a phone Portable devices APIs for unique functionality

Search files on a device and use them directly.

Upload external camera photos to SkyDrive var options = new Windows.Storage.Search.QueryOptions(…, [".jpg", ".png"]); var query = storageDevice.createFileQueryWithOptions(options); query.getFilesAsync(). then(function (pictureFiles) { picturesFiles.forEach(function (pictureFile) { WL.upload({ path: "me/skydrive", file: pictureFile, … }); });

Send & receive SMS quickly and easily.

Use SMS to locate a lost PC // Send an SMS to locate a second, lost PC var msg = new Windows.Devices.Sms.SmsTextMessage(); msg.to = "14250000000"; msg.body = "Where is my tablet?"; smsDevice.sendMessageAsync(msg).then(…); ------------------------------------------------------------ // Elsewhere …, on the lost PC smsDevice.onsmsmessagereceived = function (event) { var messageBody = event.textMessage.body; // Parse message body and reply with current location };

Access a phone’s contacts and unique functionality.

Get contacts from a phone // Contacts stored as data in the phone's Contacts Service Windows.Devices.Enumeration.DeviceInformation.findAllAsync(contactsServiceQuery). then(function (devices) { var device = portableDeviceFactory.getDeviceFromId(devices[0].id); var contactsService = device.services[0]; // Get all contact data stored in the vcard2 format contactsService.onGetChildrenByFormatComplete = function (contacts) { … }; contactsService.getChildrenByFormat("vcard2"); });

Be sure to declare the necessary capabilities in your app manifest.

Recap

Your Metro style app can seamlessly integrate device access.

Key takeaways Ecosystem of devices carrying a lot of data and content Apps create more possibilities with access to device content Windows APIs enable you to build apps that use devices

+ app devices more Ecosystem of devices More possibilities Your Metro style app

Related sessions [APP-398T] How to declare your app’s capabilities [APP-405T] Share: your app powers the Windows 8 share experience [PLAT-282T] File type associations and AutoPlay [PLAT-781T] Using location & sensors in your app [PLAT-891T] Using files: accessing, searching, and acting on files [HW-747T] Building Metro style apps that connect to specialized devices

Further reading and documentation Metro style device experience Windows.Devices.Enumeration namespace Windows.Devices.Portable namespace Windows.Devices.Sms namespace

thank you Feedback and questions http://forums.dev.windows.com Session feedback http://bldw.in/SessionFeedback

12/5/2018 7:48 PM © 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. © 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.