Nickolas Landry MVP Principal Architect Infusion Development WMB304 Who Is ActiveNick Principal Architect Practice Manager Enterprise Mobility HPC Business Dev Manager LIS Infusion Development New York City ID: 285621
Download Presentation The PPT/PDF document "Make Some Magic! Shake, Flip and Flick Y..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Slide1Slide2
Make Some Magic! Shake, Flip and Flick Your Application for Windows Mobile 6.5!
Nickolas Landry, MVPPrincipal ArchitectInfusion DevelopmentWMB304Slide3
Who Is ActiveNick?
Principal Architect
Practice Manager – Enterprise Mobility, HPC
Business Dev Manager – LIS
Infusion Development – New York CityBlog: http://home.infusionblogs.com/nlandryCorporate:
http://www.infusion.com
Web:
http://www.activenick.net
Email: nick@infusion.com16+ 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.)Slide4
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 & others
Adopted Visual Basic at v.1.0 in 1992Former MSDN Regional Director (Mtl)Microsoft Certified, IBM Certified on XMLWWISA – Founding MemberSlide5
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 PC
Windows Mobile 6 Standard = SmartphoneAll demos in this session apply to bothWindows Mobile 6.1 & 6.5Based on hardware-specific APIsSlide6
Agenda
Windows Mobile Device Input OptionsMobile UI Design Guidelines & Best PracticesNext Generation Input for DevicesWindows Mobile Unified Sensor API (Codeplex)Working with Accelerometers
Working with Light SensorsDetecting Simple Touch Screen GesturesProvide Sensory Feedback to UsersSummarySlide7
Windows Mobile Device Form Factors
Pocket PC
(including Pocket PC Phone)Tactile screen, stylus, standard buttons
QWERTY Keyboard: Built-in, “slideable
”, noneSmartphoneNumeric keypad or full QWERTY keyboardNo stylus, cursor keysIndustrial/Embedded
“Ruggedized” Pocket PCs
Numeric/Alphanumeric keypads
Handheld PC
Clamshell, Tablet-styleVGA, ½-VGA screenQWERTY KeyboardSlide8
Understanding the Windows Mobile
User Interface
Limited Screen Real Estate
Limited Memory Environment
Touch-Sensitive Screen on Pocket PCs:
Stylus or Finger Input
Soft Input Panel (Pocket PC)
Hardware Keys
Built-in/slideable Keyboards(on certain models)Numeric Keypad (Smartphone)Voice CommandsSlide9
Key User Interface Principles
Design a new UI for a mobile device,don’t port your desktop UICompletely redesign the user interface
Business logic may be reusableChoose 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 overcrowding
Limit the required number of clicks as much as possibleTake advantage of new UX hardware options!Slide10
New UX Hardware Options
User Experience (UX) includes input & outputTouch Screen GesturesFeedback via VibrationFeedback via Sounds
AccelerometersLight SensorsNavigation WheelsCapacitive Touch Screens*Not featured on any Windows Mobile device announced to dateSlide11
Windows Mobile Unified Sensor API
Allows developers to easily access the hardware sensors that are available on various devicesAccelerometer (GSensor) Light SensorStylus Sensor
Navigation WheelCodePlex Open Source Community Projecthttp://sensorapi.codeplex.comCreated by Koushik K. Dutta
http://www.koushikdutta.com
Devices: HTC Touch*, Samsung Omnia/InstinctSlide12
Accelerometer: GSensor
Return a device orientation vector
The vector is the direction of force relative to the orientation of the device.
Tilt X: 0 is flat, -1000 to +1000
Tilt Y: 0 is flat, -1000 to +1000
Tilt Z: 0 is straight up, -1000 is flat, 1000 is face down
Switch between landscape/portrait mode
Can be used to as an alternative to
4-way cursor keysCreate a new light sensor with HTCSensorOpen(HTCSensor.GSensor)
in HTCSensorSDK.dll
+Y
-Y
+X
-X
+Z
-ZSlide13
Windows Mobile Unified Sensor API
Working with the Accelerometer using GSensor
DemoSlide14
Light Sensor
Return the ambient luminance based on a device’s light sensorSingle numerical valueRanges from 0 to 30Change UI color scheme based onambient lighting
Create a new light sensor with HTCSensorOpen(
HTCSensor.Light)
in HTCSensorSDK.dllSlide15
Windows Mobile Unified Sensor API
Detecting Ambient Lighting with LightSensor
DemoSlide16
Touch Screens & Gestures
Windows Mobile devices use a resistive touch screen: single touch pointCan detect simple gestures using the “mouse” events in .NET Compact FrameworkStylus and fingers fire mouse events in
Compact Windows FormsMouseDown: Capture the start position
MouseUp: Detect end position, calculate direction, even the distance if needed
Track the position with MouseMove if the user goes off-screenSlide17
Detecting Simple Screen Gestures
Tracking the Stylus with “Mouse” Events in WinFormsDemoSlide18
Providing Feedback to the User
Visual Cues on ScreenPlaying SoundsVibrating the deviceSlide19
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 sounds
Media.SystemSounds.Asterisk.Play
()
Media.SystemSounds.Beep.Play()Media.SystemSounds.Exclamation.Play()Media.SystemSounds.Hand.Play()Media.SystemSounds.Question.Play()Slide20
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 application
Provide audible and sensory feedbackto your usersDownload and test drive the Windows Mobile
Unified Sensor API from CodePlexSlide21
Additional Resources
Windows Mobile Developer Center @ MSDN Onlinehttp://msdn.microsoft.com/en-us/windowsmobile/default.aspx
Koushik Dutta’s Blog: My Brain Hurts
http://www.koushikdutta.com
Microsoft Mobile Development HandbookBy Andy Wigley, Daniel Moth, Peter Foot – Microsoft Press (2007)Slide22
Additional Resources
Mobile WCF Session Thursday (WMB401)Upcoming White Paper on WCF MobileCo-authored by Michele Leroux Bustamante& Nickolas Landry
http://wcfguidanceformobile.codeplex.comOverviewGetting Started with Windows Mobile Development
WCF 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/nlandrySlide23
home.infusionblogs.com/nlandry
www.infusion.comnick@infusion.com
question & answerSlide24
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/learning
Microsoft Certification and Training
R
esources
www.microsoft.com/learning
Microsoft Certification & Training Resources
Resources
Required Slide
Speakers,
TechEd 2009 is not producing
a DVD. Please announce that
attendees can
access session
recordings at TechEd Online. Slide25
Windows Mobile
®
Resources
TechNet 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 Mobile
http://www.microsoft.com/events/series/msecmobility.aspx
General Information – Windows Mobile
http://www.windowsmobile.com
General Information – System Center Mobile Device Manager 2008
http://www.windowsmobile.com/mobiledevicemanager
Windows Marketplace Developer Portal
http://
developer.windowsmobile.comSlide26
Windows Mobile
®
is giving away
Blackjack II's !
Stop by the
Windows Mobile Technical Learning Center
to
learn how to enter.Slide27
Complete an evaluation on
CommNet
and enter to win!Slide28
©
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.
Required Slide