Top Banner
31

Applications can seamlessly adapt to the users environment using environmental and motion/activity sensors.

Dec 23, 2015

Download

Documents

Joanna Hicks
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Applications can seamlessly adapt to the users environment using environmental and motion/activity sensors.
Page 2: Applications can seamlessly adapt to the users environment using environmental and motion/activity sensors.

Fred BhesaniaPrincipal Program Manager2-529

Sensors Platform Enhancements in Windows

2-529

Page 3: Applications can seamlessly adapt to the users environment using environmental and motion/activity sensors.

Applications can seamlessly adapt to the users environment using environmental and motion/activity sensors

Page 4: Applications can seamlessly adapt to the users environment using environmental and motion/activity sensors.

Sensor Enhancements in Windows

Optimizing your apps around

Sensors

Hardware configurations & impact

to apps

References

Agenda

Page 5: Applications can seamlessly adapt to the users environment using environmental and motion/activity sensors.

Choosing the right sensor

Accelerometer

Inclinometer

Device Orientation

Light SensorGyrometer

Compass

Page 6: Applications can seamlessly adapt to the users environment using environmental and motion/activity sensors.

Sensors across Windows platforms

Raw Sensor Type Windows 8.1 Windows Phone 8.1

3D-Accelerometer Yes Yes

3D-Magnetometer Yes Yes

3D-Gyroscope Yes Yes

Ambient Light Yes Yes

Short Range Proximity No Yes

Simple Device

Orientation

Device Orientation Inclinometer Compass Shake

Derived Sensors (Fusion)

Page 7: Applications can seamlessly adapt to the users environment using environmental and motion/activity sensors.

Sensor Enhancements in Windows Phone 8.1

Page 8: Applications can seamlessly adapt to the users environment using environmental and motion/activity sensors.

Windows & Windows Phone automatically adjust screen brightness to help maximize readability

Windows Phone 8.1 allows apps to get ambient light readings (in LUX)

App differentiation empowered, based on environmental lighting conditions

Light sensor

http://aka.ms/gm9hhy

Page 9: Applications can seamlessly adapt to the users environment using environmental and motion/activity sensors.

Dim Lighting Conditions Minimize brightness* Maximize contrast (washes out colors) Inverse the reading mode Adjust fonts on transitions

Bright Lighting Conditions Maximize brightness* Maximize contrast and reduce colors Adjust fonts on transitions

Tips to enhance readability

* Done by OS

Outdoors(5K-50K Lux)

Indoors Bright(500-1K Lux)

Indoors Dim(10-100 Lux)

Dark Room(0-10 Lux)

Page 10: Applications can seamlessly adapt to the users environment using environmental and motion/activity sensors.

Apps can easily identify the quadrant orientation of the device

Simple gestures (face down -> ignore)

Consistent across devices

Simple orientation sensor

http://aka.ms/vmk4kv

Not Rotated

Rotated 90

Rotated 180

Rotated 270 Face Up Face

Down

Page 11: Applications can seamlessly adapt to the users environment using environmental and motion/activity sensors.

Your Windows Store App now has access to sensors even when the phone or tablet is in a locked screen state. This empowers your app to make rich decision based on motion sensors.

Sensors access in locked screen mode

Page 12: Applications can seamlessly adapt to the users environment using environmental and motion/activity sensors.

Your Windows Store App now has access to sensors even when application is swapped out.

You can now build a pedometer app that keeps recording your daily foot steps.

Sensors access for background apps

Page 13: Applications can seamlessly adapt to the users environment using environmental and motion/activity sensors.

Windows.Devices.Sensors and Microsoft.Devices.Sensors API will return data in standby for Jupiter and Silverlight applications recompiled for Windows Phone 8.1

Requirements DeviceUse Trigger App can only run one DeviceUse Trigger background task at a time

Tips Limited number of background tasks. Only 1-2 generally permitted Background tasks will be pre-empted if resources are scarce or on low battery

Requirements and tips

Page 14: Applications can seamlessly adapt to the users environment using environmental and motion/activity sensors.

CodeBackground Sensors

Page 15: Applications can seamlessly adapt to the users environment using environmental and motion/activity sensors.

Key Takeaway

1. Appxmanifest must declare use of DeviceUse Trigger

2. Build a separate process for background task

3. Optimizing the background task to ensure efficiencies

Page 16: Applications can seamlessly adapt to the users environment using environmental and motion/activity sensors.

Best practices for software developers

Page 17: Applications can seamlessly adapt to the users environment using environmental and motion/activity sensors.

1. Adapt to device formfactor2. Conserving power3. Validation scenarios

Tips for software developers

Page 18: Applications can seamlessly adapt to the users environment using environmental and motion/activity sensors.

Display orientation: direction the pictures on the screen face

Device orientation: physical positioning of the device

Critical to understand to build an app once for portrait/landscape first devices

Orientation: display vs. device

http://aka.ms/gcpdbz

Page 19: Applications can seamlessly adapt to the users environment using environmental and motion/activity sensors.

Accelerometer/gyro Accelerometer and gyroscope follow the same

basic logic in mapping

Compass projecting 3D magnetometer data onto a 2D

plane App must compensate the returned heading with

your display orientation

Orientation: display vs. device (part 2)

http://aka.ms/gcpdbz

Page 20: Applications can seamlessly adapt to the users environment using environmental and motion/activity sensors.

Listen to the sensors that make sense. Listening to all sensors WILL drain power

Adjust your report interval as long as possible in background tasks

Note that background tasks may be suspended when your devices battery is low

Conserving power

Page 21: Applications can seamlessly adapt to the users environment using environmental and motion/activity sensors.

Emulator first and then real hardware Quality: some sensors are more noisy than others. May need calibration Availability: some sensors are optional on devices Device Orientation: test on landscape and portrait first devices

Resource constrains & environments Low Battery: suspended when battery <20% No resources: background tasks occupied by other apps Lighting Conditions: do real world testing in various environments

Foreground app crash // background task lingering

Interesting validation conditions

Page 22: Applications can seamlessly adapt to the users environment using environmental and motion/activity sensors.

Hardware configurations and impact to applications

Page 23: Applications can seamlessly adapt to the users environment using environmental and motion/activity sensors.

Qualcomm Snapdragon sensor core supported (low power sensing scenarios)

UMDF 2.0 driver model supported in Windows Phone 8.1 Increases system stability and reliability Path to future convergence (single driver across all Windows devices)

KMDF still preserved for older phones that upgrade

New sensors driver model

Page 24: Applications can seamlessly adapt to the users environment using environmental and motion/activity sensors.

Windows empowers system manufactures to pick sensors per device that make sense

Most common sensors: Accelerometer Light sensor Proximity sensor (capacitive or IR)

Relative Fusion supported (accel+gyro)

Apps relying on optional sensors could leverage other forms of input, to prevent negative user feedback

Optional sensors

Page 25: Applications can seamlessly adapt to the users environment using environmental and motion/activity sensors.

• Leverage new Windows Phone 8.1 sensor capabilities

• Be cognizant of user interactions and conserve power appropriately

• Build your Apps to align to Windows and Windows Phone

Key takeaways

Page 26: Applications can seamlessly adapt to the users environment using environmental and motion/activity sensors.

Choosing the right sensor http://blogs.windows.com/windows/b/appbuilder/archive/2013/11/26/choosing-the-right-sensor.aspx

Aligning Sensors to Orientation http://blogs.windows.com/windows/b/appbuilder/archive/2013/10/29/aligning-sensors-with-your-app-s-orientation.aspx

Supporting Sensors in Windows 8 / 8.1 http://blogs.msdn.com/b/b8/archive/2012/01/24/supporting-sensors-in-windows-8.aspx

Integrating Motion and Orientation Sensors http://msdn.microsoft.com/library/windows/hardware/br259127.aspx

References

Page 27: Applications can seamlessly adapt to the users environment using environmental and motion/activity sensors.

Your Feedback is Important

Fill out an evaluation of this session and help shape future events.

Scan the QR code to evaluate this session on your mobile device.

You’ll also be entered into a daily prize drawing!

Page 28: Applications can seamlessly adapt to the users environment using environmental and motion/activity sensors.

© 2014 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.

Page 29: Applications can seamlessly adapt to the users environment using environmental and motion/activity sensors.

Extra Slides

Page 30: Applications can seamlessly adapt to the users environment using environmental and motion/activity sensors.

Fusion performed: In hardware (Microcontroller / on Soc) In Software (Vendor’s driver)

Orientation of axis are consistent between Windows 8.1 and Windows Phone 8.1

Sensor Fusion in Windows 8.1

Page 31: Applications can seamlessly adapt to the users environment using environmental and motion/activity sensors.

Win RT API

One set of APIs that connect to a smart world

Vision

Sensors Stack

Gaming

In App Gestures

Environmental awareness

Enhanced Readability

Many more

Background / locked screen