nickolas landry, mvp principal architect infusion development wmb304

28

Upload: amber-harvey

Post on 18-Dec-2015

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Nickolas Landry, MVP Principal Architect Infusion Development WMB304
Page 2: Nickolas Landry, MVP Principal Architect Infusion Development WMB304

Make Some Magic! Shake, Flip and Flick Your Application for Windows Mobile 6.5!

Nickolas Landry, MVPPrincipal ArchitectInfusion DevelopmentWMB304

Page 3: Nickolas Landry, MVP Principal Architect Infusion Development WMB304

Who Is ActiveNick?Principal ArchitectPractice Manager – Enterprise Mobility, HPCBusiness Dev Manager – LIS Infusion Development – New York City

Blog: http://home.infusionblogs.com/nlandryCorporate: http://www.infusion.comWeb: http://www.activenick.netEmail: [email protected]

16+ years of professional experienceMicrosoft MVP: Device Application Development (a.k.a. .NET Compact Framework MVP)Member of INETA Speakers BureauSpeaker at many events worldwide(Tech·Ed, MEDC, DevConnections, DevTeach,Code Camps, user groups, workshops, etc.)

Page 4: Nickolas Landry, MVP Principal Architect Infusion Development WMB304

Who Is ActiveNick? (Cont’d.)Vice-President of IASA New YorkSpecializes in enterprise mobility, architecture, Virtual Earth, smart clients, high performance computing (HPC), game development with XNA, Microsoft Robotics Studio, ….NET Mobility Blogger & Author – CoDe Magazine: Mobile CoDe.NET, MSDN White Papers & othersAdopted Visual Basic at v.1.0 in 1992Former MSDN Regional Director (Mtl)Microsoft Certified, IBM Certified on XMLWWISA – Founding Member

Page 5: Nickolas Landry, MVP Principal Architect Infusion Development WMB304

Assumptions & Disclaimers

This is a level 300 session!You already know the basics of Windows Mobile development with .NET Compact FrameworkMaking things easy:

Windows Mobile 6 Professional = Pocket PCWindows Mobile 6 Standard = Smartphone

All demos in this session apply to bothWindows Mobile 6.1 & 6.5

Based on hardware-specific APIs

Page 6: Nickolas Landry, MVP Principal Architect Infusion Development WMB304

Agenda

Windows Mobile Device Input OptionsMobile UI Design Guidelines & Best PracticesNext Generation Input for DevicesWindows Mobile Unified Sensor API (Codeplex)

Working with AccelerometersWorking with Light Sensors

Detecting Simple Touch Screen GesturesProvide Sensory Feedback to UsersSummary

Page 7: Nickolas Landry, MVP Principal Architect Infusion Development WMB304

Windows Mobile Device Form Factors

Pocket PC (including Pocket PC Phone)Tactile screen, stylus, standard buttonsQWERTY Keyboard: Built-in, “slideable”, none

SmartphoneNumeric keypad or full QWERTY keyboardNo stylus, cursor keys

Industrial/Embedded“Ruggedized” Pocket PCsNumeric/Alphanumeric keypads

Handheld PCClamshell, Tablet-styleVGA, ½-VGA screenQWERTY Keyboard

Page 8: Nickolas Landry, MVP Principal Architect Infusion Development WMB304

Understanding the Windows MobileUser Interface

Limited Screen Real EstateLimited Memory EnvironmentTouch-Sensitive Screen on Pocket PCs:Stylus or Finger InputSoft Input Panel (Pocket PC)Hardware KeysBuilt-in/slideable Keyboards(on certain models)Numeric Keypad (Smartphone)Voice Commands

Page 9: Nickolas Landry, MVP Principal Architect Infusion Development WMB304

Key User Interface PrinciplesDesign a new UI for a mobile device,don’t port your desktop UI

Completely redesign the user interfaceBusiness logic may be reusable

Choose the correct model based on the form factorPocket PC should always be full-screenLimit free text entry on devices with no keyboards

Keep the user interface simpleAvoid control overcrowdingLimit the required number of clicks as much as possible

Take advantage of new UX hardware options!

Page 10: Nickolas Landry, MVP Principal Architect Infusion Development WMB304

New UX Hardware Options

User Experience (UX) includes input & outputTouch Screen GesturesFeedback via VibrationFeedback via SoundsAccelerometersLight SensorsNavigation WheelsCapacitive Touch Screens*

Not featured on any Windows Mobile device announced to date

Page 11: Nickolas Landry, MVP Principal Architect Infusion Development WMB304

Windows Mobile Unified Sensor API

Allows developers to easily access the hardware sensors that are available on various devices

Accelerometer (GSensor) Light SensorStylus SensorNavigation Wheel

CodePlex Open Source Community Projecthttp://sensorapi.codeplex.com

Created by Koushik K. Duttahttp://www.koushikdutta.com

Devices: HTC Touch*, Samsung Omnia/Instinct

Page 12: Nickolas Landry, MVP Principal Architect Infusion Development WMB304

Accelerometer: GSensorReturn a device orientation vectorThe vector is the direction of force relative to the orientation of the device.

Tilt X: 0 is flat, -1000 to +1000Tilt Y: 0 is flat, -1000 to +1000Tilt Z: 0 is straight up, -1000 is flat, 1000 is face down

Switch between landscape/portrait modeCan be used to as an alternative to4-way cursor keysCreate a new light sensor with HTCSensorOpen(HTCSensor.GSensor)in HTCSensorSDK.dll

+Y

-Y

+X

-X

+Z-Z

Page 13: Nickolas Landry, MVP Principal Architect Infusion Development WMB304

Windows Mobile Unified Sensor APIWorking with the Accelerometer using GSensor

Demo

Page 14: Nickolas Landry, MVP Principal Architect Infusion Development WMB304

Light Sensor

Return the ambient luminance based on a device’s light sensorSingle numerical value

Ranges from 0 to 30Change UI color scheme based onambient lightingCreate a new light sensor with HTCSensorOpen(HTCSensor.Light)in HTCSensorSDK.dll

Page 15: Nickolas Landry, MVP Principal Architect Infusion Development WMB304

Windows Mobile Unified Sensor APIDetecting Ambient Lighting with LightSensor

Demo

Page 16: Nickolas Landry, MVP Principal Architect Infusion Development WMB304

Touch Screens & Gestures

Windows Mobile devices use a resistive touch screen: single touch pointCan detect simple gestures using the “mouse” events in .NET Compact Framework

Stylus and fingers fire mouse events in Compact Windows FormsMouseDown: Capture the start positionMouseUp: Detect end position, calculate direction, even the distance if neededTrack the position with MouseMove if the user goes off-screen

Page 17: Nickolas Landry, MVP Principal Architect Infusion Development WMB304

Detecting Simple Screen GesturesTracking the Stylus with “Mouse” Events in WinForms

Demo

Page 18: Nickolas Landry, MVP Principal Architect Infusion Development WMB304

Providing Feedback to the User

Visual Cues on ScreenPlaying SoundsVibrating the device

Page 19: Nickolas Landry, MVP Principal Architect Infusion Development WMB304

Playing Sound in NETCF 3.5

// Play custom sound files with SoundPlayerDim soundplayer As New Media.SoundPlayer

With soundplayer .SoundLocation = "\My Documents\My

Ringtones\murloc.wav" .Play()End With

// Play standard system soundsMedia.SystemSounds.Asterisk.Play()Media.SystemSounds.Beep.Play()Media.SystemSounds.Exclamation.Play()Media.SystemSounds.Hand.Play()Media.SystemSounds.Question.Play()

Page 20: Nickolas Landry, MVP Principal Architect Infusion Development WMB304

Summary

Users expect more from their mobile devicesCreate a next generation user experience (UX)Tap into the advanced hardware capabilities of your Windows Mobile devicesMake your device application input intuitiveUse simple gestures to add another layer of interaction to your mobile applicationProvide audible and sensory feedbackto your usersDownload and test drive the Windows MobileUnified Sensor API from CodePlex

Page 21: Nickolas Landry, MVP Principal Architect Infusion Development WMB304

Additional ResourcesWindows Mobile Developer Center @ MSDN Onlinehttp://msdn.microsoft.com/en-us/windowsmobile/default.aspx

Koushik Dutta’s Blog: My Brain Hurtshttp://www.koushikdutta.com

Microsoft Mobile Development HandbookBy Andy Wigley, Daniel Moth, Peter Foot – Microsoft Press (2007)

Page 22: Nickolas Landry, MVP Principal Architect Infusion Development WMB304

Additional ResourcesMobile WCF Session Thursday (WMB401)Upcoming White Paper on WCF Mobile

Co-authored by Michele Leroux Bustamante& Nickolas Landryhttp://wcfguidanceformobile.codeplex.comOverview

Getting Started with Windows Mobile DevelopmentWCF Primer for Mobile DevelopersCode Samples: Greeting, ToDo, WS-Security, etc.Differences from Full WCF to Mobile WCFContract Design, Proxy Generation, BindingsDebugging, Exception Handling, Message HeadersREST-based Services, Mobile WCF Security, etc.

Michele’s Blog: www.dasBlonde.net Nick’s Blog: home.infusionblogs.com/nlandry

Page 23: Nickolas Landry, MVP Principal Architect Infusion Development WMB304

home.infusionblogs.com/[email protected]

question & answer

Page 24: Nickolas Landry, MVP Principal Architect Infusion Development WMB304

www.microsoft.com/teched

Sessions On-Demand & Community

http://microsoft.com/technet

Resources for IT Professionals

http://microsoft.com/msdn

Resources for Developers

www.microsoft.com/learningMicrosoft Certification and Training Resources

www.microsoft.com/learning

Microsoft Certification & Training Resources

Resources

Page 25: Nickolas Landry, MVP Principal Architect Infusion Development WMB304

Windows Mobile® ResourcesTechNet TechCenter – System Center Mobile Device Manager 2008

http://technet.microsoft.com/scmdm

TechNet TechCenter – Windows Mobile http://technet.microsoft.com/windowsmobile

 MSDN Center – Windows Mobile   

http://msdn.microsoft.com/windowsmobile

Webcasts and Podcasts for IT – Windows Mobilehttp://www.microsoft.com/events/series/msecmobility.aspx

General Information – Windows Mobilehttp://www.windowsmobile.com

General Information – System Center Mobile Device Manager 2008http://www.windowsmobile.com/mobiledevicemanager

Windows Marketplace Developer Portalhttp://developer.windowsmobile.com

Page 26: Nickolas Landry, MVP Principal Architect Infusion Development WMB304

Windows Mobile® is giving away Blackjack II's !

Stop by the Windows Mobile Technical Learning Center to learn how to enter.

Page 27: Nickolas Landry, MVP Principal Architect Infusion Development WMB304

Complete an evaluation on CommNet and enter to win!

Page 28: Nickolas Landry, MVP Principal Architect Infusion Development WMB304

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