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

31

Upload: joanna-hicks

Post on 23-Dec-2015

218 views

Category:

Documents


0 download

TRANSCRIPT

Fred BhesaniaPrincipal Program Manager2-529

Sensors Platform Enhancements in Windows

2-529

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

Choosing the right sensor

Accelerometer

Inclinometer

Device Orientation

Light SensorGyrometer

Compass

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)

Sensor Enhancements in Windows Phone 8.1

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

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)

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

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

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

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

CodeBackground 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

Best practices for software developers

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

Tips for software developers

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

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

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

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

Hardware configurations and impact to applications

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

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

• 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

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

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!

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

Extra Slides

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

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